Loading...
Loading...
Loading...
Section 12 · Stage 6: Master Python
Generators, decorators, context managers, type hints and packages.
Process data one item at a time. The iterator protocol, Generator functions and expressions, yield from, itertools essentials.
Add behaviour without changing a function. Closures, Writing decorators, functools.wraps and lru_cache, Decorators with arguments.
Set up and clean up safely. The with statement, __enter__ and __exit__, contextlib.
Make code easier to read and check. Annotating functions and classes, Optional, Union and generics, Protocols, Checking with mypy.
Organise and share your code. Packages and __init__.py, pyproject.toml, Dependency management, Publishing basics.