~/talk

Fantastic Blocks And Where To Hide Them

Talkat PyCon AU 2019 · 2019-08-02..08-06· [python]
slides:none on file

Claims that Python lacks anonymous blocks are backed by history: a 2005 PEP to pass thunks is rejected, the with statement is chosen instead, and async/await arrives years later after JavaScript borrows co-routine syntax. The talk builds working implicit builders and a fold/either implementation using decorators, demonstrates they function but confuse control flow by hijacking def and decorator semantics, and argues for restricting decorators to their conventional role and adding explicit syntax for these patterns.

AI-written summary · about

  1. 0:00Intro
  2. 1:26Thank you for coming!
  3. 2:20Python Ruby
  4. 3:57Interfaces that expect blocks are not Pythonic
  5. 4:29Is Python keeping up with
  6. 4:44Context Managers Blocks vs Structured Delegation
  7. 5:13Ruby on Rails
  8. 8:18Ruby's model depends on convention.
  9. 8:37Python opted for syntax that communicates structure
  10. 9:00Asynchronous I/O Non-Blocking Blocks
  11. 10:462008
  12. 11:57Blocks look terrible
  13. 13:10Not having blocks meant Python explored coroutines
  14. 13:50Python found better patterns because it didn't have blocks.
  15. 14:00The Builder Pattern Implicit is better than Explicit?
  16. 15:05Complex Data Structures
  17. 15:45Builders are Intermediaries
  18. 16:56Can this work in Python?
  19. 17:45But What's The Syntax?
  20. 18:49Is this good Python?
  21. 19:31Are decorators Pythonic?
  22. 20:01Error Handling Exceptions: Exceptional?
  23. 20:28Python only provides one tool for handling errors.
  24. 22:33The Either Type
  25. 22:47The Union Type
  26. 23:25Fold is convention. What about Syntax?
  27. 23:37Pattern Matching
  28. 24:14Surely matching on types isn't Pythonic?
  29. 25:26What about fold?
  30. 27:13Decorators let you call functions by defining functions.
  31. 28:26North Bay Python 2019 Petaluma, California CFP closes Friday!
~/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.