~/talk

Or Else! An Exploration of Obscure Control Flow

Talkat PyCon US 2025 · 2025-05-16..05-18· [python]
links:none on file
slides:none on file

Claims several concrete behaviors: for-else executes when loop exhausts iterable, try-except-else runs only on no-exception, decorators execute at definition time and can start loops immediately, and generators support bidirectional send/throw plus StopIteration.value. Tools demonstrated include a published do while package on Pippi implements a post-tested loop via decorator, and a toy text-adventure whose core engine is ~28 lines with the repo under 200 lines. Live demos run and the do-while implementation actually works as shown.

AI-written summary · about

  1. 0:00Welcome
  2. 1:03Control flow in Python
  3. 2:07Comprehensions readability
  4. 4:13Else block
  5. 7:05Decorators as control flow
  6. 9:34Until and do-while loops
  7. 12:43Generators bidirectional
  8. 16:16State machine with generators
  9. 18:43Text adventure game
  10. 21:40Closing
~/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.