Know and Love Your yield: Coroutines and Generators Beyond the for Loop
summary
Explains how Python generators and coroutines work beyond simple for-loop use, focusing on what the interpreter does for yield from versus a for loop plus yield. Demonstrates programming techniques built on generators/coroutines and discusses major libraries that treat coroutines as a core language feature.
AI-written summary · about
chapters (16)
- 0:00Generators introduction
- 6:51Python code objects
- 13:38How generators work
- 16:29Generators history
- 18:19Coroutines and yield from
- 21:36Limitations of yield from
- 25:13Current coroutine limits
- 27:43Coroutine queues
- 29:52Visitors and generators
- 33:01Context managers
- 34:23Finite state machines
- 36:15Pipe library
- 39:23Push-based pipelines
- 40:53Fibonacci streams
- 42:37Async I/O with generators
- 43:20Debugging greenlets
