Static Typing in Python
summary
Claim: Python is dynamically typed but can be made as statically typed as desired. History and specifics: PEP 3107 adds annotations in 2006, PEP 484 and the typing module standardize type hints (2014) and PEP 526 adds variable annotations (2016). Tools: mypy (pip installable), pytype, PyCharm type checker. Evidence: Dropbox applies typing across millions of lines to reduce developer friction; mypy evolves from a research variant into a working static checker.
AI-written summary · about
chapters (22)
- 0:00Intro
- 0:45Question
- 1:15Types
- 3:10Variables
- 3:39Arguments and Returns
- 5:59Duck Typing
- 8:19Annotations
- 9:43Myapi
- 11:54Optional typing
- 12:21Gradual typing
- 12:47Type hinting
- 13:07Special type constructs
- 14:18Generic types
- 14:45Type int
- 15:14Pet 526
- 15:46Type Checkers
- 17:00PiType vs PiType
- 18:22When and why should you use static typing
- 18:55When should you use static typing
- 20:26Experimenting with static typing
- 20:41Summary
- 21:27Outro
related talks
32mStatic Typing in Python
29mStatic Typing in Python
35mStatic Typing in Python
24mStatic type-checking is dead, long live static type-checking in Python!
28mGradual Typing in Python
23mGradual Typing in Python
32mPython's New Type Hints in Action… In JavaScript
27m"How to Use Static Typing in Python with Type Hints, MyPy and Pydantic"
