In case anyone's wondering about the two PEPs GvR mentions:<p>PEP 380 (<a href="http://www.python.org/dev/peps/pep-0380/" rel="nofollow">http://www.python.org/dev/peps/pep-0380/</a>) would provide a convenient way for one generator function to yield all the values of another as part of its work. At the moment you have to say something like<p><pre><code> for x in foo:
yield x
</code></pre>
which isn't all that bad in itself but breaks down when your caller starts sending values back to you, coroutine-style. (Because they go to foo and you never get to see them.)<p>PEP 3152 (<a href="http://www.python.org/dev/peps/pep-3152/" rel="nofollow">http://www.python.org/dev/peps/pep-3152/</a>) uses the generator mechanism (as enhanced by PEP 380) which already provides something rather like coroutines, and adds some syntactic sugar to let you write coroutines that <i>look</i> like coroutines.
Quoting from PEP 303:<p>This PEP proposes a temporary moratorium (suspension) of all changes to the Python language syntax, semantics, and built-ins for a period of at least two years from the release of Python 3.1. In particular, the moratorium would include Python 3.2 (to be released 18-24 months after 3.1) but allow Python 3.3 (assuming it is not released prematurely) to once again include language changes.<p>Python 3.2 is newly released and 3.3 development has started.
Did anyone else think "Wow, 2 years already"? (I remember people claiming the moratorium was a signal of Python's demise...)<p>I'm happy about PEP 380, it seems like they might as well do PEP 3152 as well since they're highly related...