~/talk

Typing in Python: Bringing Clarity, Safety, and Speed to Your Code

Talkat XtremePython 2024 Online Conference · on Tuesday, 2024-11-19· [python, typescript]
slides:none on file

Adds static type annotations like list[str] → dict[str, list[str]], generics via TypeVar T for functions that return the same element type as their list input, type aliases such as Vector = list[float], and NewType wrappers for domain IDs. Annotations do not change runtime behavior but allow static checkers (mypy recommended) to find mismatches like passing a string where an int is expected before deployment, improving code quality and reducing runtime type errors in large codebases.

AI-written summary · about

  1. 0:00Introduction to Python typing
  2. 1:48Why types improve code quality
  3. 3:35Static analysis with type hints
  4. 6:24Basic type annotations
  5. 7:50Complex data structures
  6. 8:54Generics and aliases
  7. 11:47Custom types
  8. 12:51Union types
  9. 13:54Next steps with static tools
  10. 15:21Summary and Q&A
~/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.