Typed Python ...or what I like to call: Python++
summary
Typed Python adds real static typing to Python and delivers concrete features: dataclasses and attrs create zero-cost struct-like classes with auto init, equality, hashing and slots; mypy and PyCharm perform static checks; Literal and overload plus TypeVar, Union and new 3.10 | syntax express value-dependent returns. A runtime-accessible typing API is used to write a generic JSON→class parser/validator at IBM that returns precise indexed errors for graphs and nodes and it works in production to replace ad hoc dict handling.
AI-written summary · about
chapters (14)
- 0:00Introduction to Typed Python
- 2:31Python's typing evolution
- 7:48Type support in classes
- 10:14Class fields and data classes
- 19:53Unions and type flexibility
- 23:01Union syntax improvements
- 25:33Type variables and generics
- 30:33Self-typed methods
- 32:39Custom generic types
- 34:25Overloads for complex types
- 38:24Literal types explained
- 41:57Runtime type access benefits
- 43:43Practical parsing example
- 47:16Why Python++ matters
