~/talk

On the Use and Misuse of Decorators

Talkat PyConline AU 2021 · 2021-09-10..09-12· [python]
slides:none on file

Asserts that a decorator is an expression evaluated to a function that may do anything not just wrap another function; shows concrete patterns and tools: uses functools and Django examples, implements a run decorator that turns a one-off function into a scoped value, an apply decorator to simulate multi-line lambdas, a builder pattern for nested HTML, and a code-registry like Pants’ rule registry that composes small transformations into working pipelines.

AI-written summary · about

  1. 0:00Introduction
  2. 2:56What are Decorators
  3. 5:33What is a Decorators
  4. 6:55The Problem with Namespaces
  5. 9:08Source of Inspiration
  6. 10:18The Decorate Pattern
  7. 10:42The Problem
  8. 12:01Encapsulation
  9. 12:56Property
  10. 14:55Django
  11. 16:21Scoped Blocks
  12. 19:02Stream Transformations
  13. 21:29Builders
  14. 23:31Code Registry
  15. 25:51AppRouter
  16. 26:14Pants
  17. 27:00Conclusion
  18. 27:12Summary
  19. 27:55Outro
~/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.