~/talk

Static Typing in Python

Talkat PyCon India 2020 · 2020-10-02..10-05· [python, typescript]
links:none on file
slides:none on file

Defines static typing as optional since Python is dynamic, explains PEP 484 annotations (Python 3.5+), and demonstrates concrete fixes: annotating a parameter prevents the runtime bug AttributeError: 'dict' object has no attribute 'split'. Shows complex types (Union, Optional, Any, Sequence, generics) and recommends tools: mypy in CI plus alternatives pyre and pyright, and using monkeytype stubs to auto-generate annotations for legacy code while noting import-time overhead and added annotation work.

AI-written summary · about

  1. 0:00Introduction
  2. 8:00Why Type
  3. 10:39Test Cases
  4. 13:44Structure Typing
  5. 18:24Union Type
  6. 20:54Optional Type
  7. 24:19Generics
  8. 26:24Mypi
  9. 27:14Monkey Typing
  10. 29:29Pros Cons
  11. 31:54Questions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.