Why You Should Care About Types
summary
Argues that adding type annotations makes large Python codebases easier to read, speeds onboarding and prevents guesswork; shows incremental workflow that types a few utility modules first, gates checks in CI, and uses MonkeyType to collect runtime signatures and bootstrap 20–30% in a day of annotations. Compares type checkers and claims Pyre runs minutes faster than mypy on huge repos (example: 5 min → 45 s), demonstrates protocols for duck typing and recommends dataclasses/namedtuples for JSON.
AI-written summary · about
chapters (21)
- 0:00Intro
- 0:11whoami
- 5:19What jobs?
- 9:37Scale my team @FB
- 12:08Are Python types Pythonic?
- 13:22Is Python turning into Java?
- 15:36How did it start? • PEP 3107 - Function Annotations (2006) By Collin Winter and Tony Lownds
- 16:23What needs to be annotated?
- 18:20Collections
- 19:27Unions
- 23:21The Type Checker
- 25:39The Easy Bit New projects
- 26:40The Hard Part Existing (Large) Projects
- 28:46The Hard Part Bit Existing (Large) Projects
- 31:28Stubs
- 32:03Monkey Type
- 34:38Where did the ducks end up? Duck typing in the typed world
- 35:50Protocols
- 37:27The Typeshed
- 39:04#type: ignore
- 44:44Summary Type annotations are Pythonic
related talks
03h 38mPython Types for Fun and Profit
32mType-checked Python in the real world
38mMigrating existing codebases to using type annotations
04mUnpopular Opinion? - Python Typing Is Not Worth It
28mGradual Typing in Python
28mMind the gap! Why static typing requires more than just adding annotations
24mDuck Typing Is For The Birds
13mPython 3 Types in the Wild: A Tale of Two Type Systems
