~/talk

All about decorators

Talkat PyCon US 2024 · 2024-05-15..05-23· [python]
slides:none on file

Shows exactly what gets built and what works: writes a bunch of decorators that wrap functions, uses splat args and double-splat kwargs so wrappers accept any signature, demonstrates functools.wraps to preserve names, uses nonlocal counter storage for per-decorator state, implements memoize and a timing logger that appends to timing.txt, a once-per-minute gate that raises an error when called too soon, and class decoration that stamps instances with creation time — all examples run live and produce the promised files and outputs.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 5:23Understanding decorators
  3. 15:54Applying decorator syntax
  4. 26:56Advanced decorator mechanics
  5. 38:30Timing functions with decorators
  6. 50:57Stateful decorators
  7. 1:09:02Caching and rate limiting
  8. 1:25:06Filtering inputs
  9. 1:37:23Metadata and parameterized decorators
  10. 1:45:42Stacking and class decorators
  11. 1:59:43Final discussion and wrap-up
~/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.