Proposal for a Coroutine Syntax for Python

Here 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.

Draft PEP

PEP XXX: Cofunctions

Prototype Implementation

In 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.

Also includes tests and examples.


Translations of the examples provided with the yield-from patches. See the Yield From page for full discussion.