Beyond Python Enhanced Generators
summary
Argues that generalized generators unlocked practical streaming concurrency and shows a concrete implementation called waitless made of compose plus gio that wires generators to sockets. Demonstrates how compose auto‑delegates (like yield from), preserves a real generator stack so exceptions produce useful stack traces, returns values via StopIteration, and implements pushback buffering so parsers avoid global copies. Builds a streaming HTTP-like protocol on top, replaces awkward boilerplate with one composition primitive, and reports the system works and simplifies real-world IO and debugging.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 5:00Coroutines
- 9:50Four topics
- 11:12Agenda
- 13:23Structured Programming
- 16:51Interleaving
- 18:27Recognition
- 19:48Buffering
- 23:22Application
- 28:21Python Code
- 35:50PEP 380
- 38:23compose
- 44:14composed generator
- 46:54stop iteration
- 50:23yield None
related talks
49mGenerators Will Free Your Mind
20mIt's Critical: Concurrent programming as a sane programming model
42mAre generator-coroutines really the answer?
26mGenerators, coroutines and nanoservices
59mGet to grips with asyncio in Python 3
01h 00mCoroutine Concurrency in Python 3 with asyncio
32mPractical usage of advanced Python constructs
30mWhat are you yield from?
