A great explanation about "yield" followed by a discussion of coroutines and more:
- Generator Tricks for Systems Programmers
- http://www.dabeaz.com/generators/Generators.pdf
In the sequel, he goes into even more detail and the uses all the information to write an operating system in Python.
- A Curious Course on Coroutines and Concurrency:
- http://www.dabeaz.com/coroutines/Coroutines.pdf
Wow, this is absolutely motivating.
I knew generators were cool, but I had never seen the full extent of their power.