~/talk

Keynote – Łukasz Langa

Talkat PyCon US 2022 · 2022-04-27..05-03· [python]
slides:none on file

Argues that type annotations reveal, not add, complexity and that readable annotations and small refactors make large codebases maintainable; demonstrates using modern typing features landed since Python 3.5 (recommend Python 3.9/3.10 typing), gives concrete recipes: name complex types, prefer concrete return types over unions, use exceptions instead of None, split dynamic functions, and format with Black; points to TypedDict and NewType and mentions self type and variance as next steps.

AI-written summary · about

  1. 0:00Start
  2. 4:36TYPE ANNOTATIONS ARE DOCUMENTATION
  3. 6:29UGLY TYPE ANNOTATIONS HINT AT UGLY CODE
  4. 8:17USE MODERN TYPING SYNTAX
  5. 11:05STANDARDIZE SIGNATURE FORMATTING
  6. 12:28GIVE YOUR TYPES MEANINGFUL NAMES
  7. 14:22DISPATCH EARLY TO SPECIALIZE
  8. 20:02USE EXCEPTIONS FOR EXCEPTIONAL STATES
  9. 20:36USE EMPTY VALUES
  10. 28:50ONE VARIABLE ONE TYPE
  11. 30:51NOMINAL VS STRUCTURAL TYPING
  12. 33:21A STRING IS ALSO AN ITERABLE OF STRINGS
  13. 34:41object
  14. 40:39TOO MUCH OF A GOOD THING CAN HURT YOU
  15. 41:17IF YOUR TYPES ARE UGLY CONSIDER REFACTORING
~/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.