Last Updated: May 22, 2026
This lesson is about the typing module, the standard library module that fills in everything basic generics don't cover: optional values, multiple allowed types, function signatures as values, and the abstract collection types you should reach for when writing function parameters. We'll also cover the modern | operator, which has quietly replaced most of typing.Union and typing.Optional in idiomatic 3.10+ code.