Beyond Python Enhanced Generators
summary
Argues that generalized generators (PEP 342/380) let entire applications be written as composed coroutines and describes a working implementation called compos (library) that runs large real apps with generators only. Shows concrete fixes: a small stack/state mechanism for exceptions and returns, a push-back message cube for unconsumed bytes in HTTP parsing, and turning StopIteration into return values. Claims a frustrating bug went away after removing three lines; demonstrates working HTTP request/headers/body parsing and delegation that matches PEP 380 behavior.
AI-written summary · about
chapters (15)
- 0:00Start
- 0:07Beyond Python Enhanced Generators
- 1:20A very profound addition
- 5:00Trampoline model (actors)
- 6:36Weightless's Model
- 9:51Four Topics
- 11:16Agenda
- 13:24Jackson Structured Programming
- 15:53Boudary Clashes
- 16:51Interleaving Clashes
- 17:53Ordering Clashes
- 18:28Recognition Difficulties
- 19:48Program Inversion
- 23:22Applicability
- 25:38Different modes
related talks
42mAre generator-coroutines really the answer?
41mMore About Generators
49mGenerators Will Free Your Mind
26mGenerators, coroutines and nanoservices
32mPractical usage of advanced Python constructs
30mWhat are you yield from?
27mWhen to refactor your code into generators and how
01h 29mStandardised Coroutine Concurrency in Python 3
