How do you define Python functions that accept optional arguments or default values? Are you wondering how to go beyond being a beginner with Python? This week on the show, Christopher Trudeau is here, and he’s brought another batch of PyCoder’s Weekly articles and projects.
Christopher shares a Real Python article, “Defining Python Functions With Optional Arguments.” We talk about function flexibility, specifying default values, and using args
& kwargs
.
We discuss resources for a Python beginner to move beyond the basics and become more competent. Both of us share our experiences moving past these hurdles.
We cover several other articles and projects from the Python community, including a news roundup, ten tools you may have wished you knew when you started working with Python, Python’s zipfile
for manipulating your zip files efficiently, how one company optimized Python API server code by 100x, a dependency-free Python library for downloading YouTube videos, and how to use Python on the command line with other shell commands.
Course Spotlight: Defining Python Functions With Optional Arguments
In this video course, you’ll learn about Python optional arguments and how to define functions with default values. You’ll also learn how to create functions that accept any number of arguments using args and kwargs.
Topics:
- 00:00:00 – Introduction
- 00:03:08 – Django Project Reformats Entire Codebase With Black
- 00:03:53 – PEP 673: Self Type Was Accepted
- 00:05:16 – PEP 654 Accepted: Exception Groups
- 00:07:45 – Upcoming Python Feature PEPs
- 00:10:01 – Defining Python Functions With Optional Arguments
- 00:15:12 – Sponsor: CData Software
- 00:15:53 – 10 Tools I Wish I Knew When I Started Working With Python
- 00:23:22 – How We Optimized Python API Server Code 100x
- 00:29:47 – Python’s zipfile: Manipulate Your ZIP Files Efficiently
- 00:32:47 – Video Course Spotlight
- 00:33:59 – How Do I Go From Being a Beginner to Competent in Python?
- 00:47:02 – pytube: Dependency-Free Python Library for Downloading – YouTube Videos
- 00:49:30 – pz: Use Python on the Command Line With Other Shell Commands
- 00:52:23 – Thanks and goodbye
News:
Topics:
- Defining Python Functions With Optional Arguments – Learn about Python optional arguments and how to define functions with default values. You’ll also see how to create functions that accept any number of arguments using
*args
and **kwargs
.
- 10 Tools I Wish I Knew When I Started Working With Python – Learn about how venvs, flake8, black, isort, pytest, commitizen, semantic-release, pre-commit hooks, and Github Actions work together!
- How We Optimized Python API Server Code 100x – Tricks we used to speed up calls to our analytical API written in Python: asyncio, SQLAlchemy, asyncpg, Cython plugins, improved data structures, and replaced some Pandas with NumPy.
- Python’s zipfile: Manipulate Your ZIP Files Efficiently – In this guided tutorial, you’ll learn how to manipulate ZIP files using Python’s zipfile module from the standard library. Through hands-on examples, you’ll learn how to read, write, compress, and extract files from your ZIP files quickly.
- How Do I Go From Being a Beginner to Competent in Python?
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Support the podcast & join our community of Pythonistas