Proposal for a Coroutine Syntax for PythonHere is a proposal that builds on my earlier yield from mechanism to provide a more streamlined and less error-prone way to write generator-based coroutine code.
Prototype ImplementationIn the form of patches to Python 3.1.2.
NOTE: Before installing these patches, the YieldFrom-Python3.1.2-rev5 patches must be installed first.
Cofunctions-Python3.1.2-rev2.zipAlso includes tests and examples.
ExamplesTranslations of the examples provided with the yield-from patches. See the Yield From page for full discussion.