Python Types for Fun and Profit
summary
Claims that static typing catches bugs early and scales to real codebases, and the session shows how with pyre plus inference and MonkeyType you can annotate, run a checker, and put it in CI. Demonstrations use a demo repo, watchman for fast incremental checks, and pyre infer to bulk-add annotations; Instagram’s effort spans millions of lines and reaches 99% coverage in examples. Outcomes: faster edits (errors surface in seconds), fewer runtime surprises, and usable editor/PR integrations.
AI-written summary · about
chapters (22)
- 0:00Start
- 1:56What Are Types Why Do You Need Type Checking
- 15:32Example of a Typed Function
- 16:11Star Args
- 19:38Attributes
- 24:41Dictionaries
- 25:37Recursive Aliases
- 29:30Recap
- 33:53Exercises
- 41:28Runtime Type Checker
- 44:59Reveal Type
- 48:20Exercise with Classes
- 1:00:37Annotate Functions
- 1:01:51Dictionaries and Tuples
- 1:18:01Install the Type Checker
- 1:20:42Run the Type Checker on Your Machine for the First Time
- 1:22:20Pyre Init
- 2:03:52Gradual Typing
- 2:04:04Type Annotations in Python Are Always Optional
- 2:05:55Gradual Type System
- 2:16:38Automatic Type Inference
- 2:17:15Coverage Visibility
related talks
27mGradual Typing in Practice
57mWhy You Should Care About Types
24mDuck Typing Is For The Birds
30mTyping at scale: statically type-checking a large codebase
30mClearer Code at Scale: Static Types at Zulip and Dropbox
03h 40mTyping
28mMind the gap! Why static typing requires more than just adding annotations
38mMigrating existing codebases to using type annotations
