Python diff: Modern Python, if you learned it long ago
Length: 2 days
Description
If you learned Python years ago, then there’s good news: The fundamentals of the language haven’t changed. Most of the code you wrote back then will still work.
However, Python has changed and improved in numerous ways, especially since Python 3 was released — and the changes continue to come at a rapid clip. In this two-day course, we’ll explore a variety of ways in which Python has “grown up” over the last two decades, helping you to catch up with topics and techniques. We’ll discuss (among other things) function parameter types, type hints, structural pattern matching, opcodes, dict/set comprehensions, objects, descriptors, generators, and concurrency, including asyncio. We’ll also discuss the greater Python ecosystem, including such tools as Ruff, Black, and uv, the way in which Python is developed and governed, and what functionality and improvements we can expect in the coming years.
Like all of my courses, this is taught without slides. Instead, I live-code into a Jupyter notebook and files that are available in real time, and which I distribute to participants at the end of the course.
Let’s talk about how to customize this course for your team! Set a meeting at https://savvycal.com/reuven/corp-training.
Audience
Experience writing Python functions and classes, including passing functions as arguments.
Syllabus
• How is Python developed, governed, and released?
• f-strings, format codes, and t-strings
• The walrus (assignment expression) operator
• Modern dicts
• Structural pattern matching
• Bytecodes and the JIT
• The seven types of Python function parameters
• Type annotations and mypy
• Dict and set comprehensions
• Modern Python objects, including dunder methods
• The iterator protocol, generator functions, and generator expressions
• Python concurrency: Threads, multiprocessing, subinterpreteres, concurrency.futures, the removal of the GIL, and asyncio
• uv, the modern Python package manager that replaces pip, pyenv, and more
• Using Black and Ruff
•
