by prog on 2/26/11, 8:36 AM with 29 comments
by gjm11 on 2/26/11, 10:01 AM
PEP 380 (http://www.python.org/dev/peps/pep-0380/) 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
for x in foo:
yield x
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.)PEP 3152 (http://www.python.org/dev/peps/pep-3152/) 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 look like coroutines.
by dalke on 2/26/11, 9:40 AM
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.
Python 3.2 is newly released and 3.3 development has started.
by Jach on 2/26/11, 9:44 PM
I'm happy about PEP 380, it seems like they might as well do PEP 3152 as well since they're highly related...
by anonymoushn on 2/26/11, 11:53 AM