[Python-Dev] EuroPython Language Summit report

Guido van Rossum guido at python.org
Sat Jun 25 18:44:36 CEST 2011

On Sat, Jun 25, 2011 at 9:32 AM, R. David Murray <rdmurray at bitdance.com> wrote:
> On Sat, 25 Jun 2011 11:31:42 -0400, "P.J. Eby" <pje at telecommunity.com> wrote:
>> At 10:46 AM 6/25/2011 +1000, Nick Coghlan wrote:
>> >Indeed, PEP 380 is *really* hard to do properly without language
>> >support.
>> No, it isn't.  You add a decorator, a 'from_' class, and a 'return_'
>> function, and there you go.  (See my previous code sketches here in
>> early PEP 380 discussions.)
>> Python frameworks have been doing variations of the same thing (with
>> varying features and APIs) for at least 7 years now -- even on Python
>> versions that lack decorators or the ability to return values from
>> yield statements.
>> So the main benefit of a PEP for this functionality would be
>> providing a common implementation/API - and that could be initially
>> done in the stdlib, without any added syntax support.
> So your proposed code would allow me, when writing a generator in
> my code, do something that would allow me to yield up all the
> values from an arbitrary generator I'm calling, over which I have
> no control (ie: I can't modify its code)?

Let me cut this short. PEP 380 is pretty much approved. I know there
are a few details worth quibbling over, but they are not going to
jeopardize acceptance of the PEP. We are waiting for an implementation
in Python 3.3. In fact, I wouldn't mind at this point if someone took
their best effort at an implementation and checked it into the 3.3
branch, and we can do the quibbling over the details while we have a
working implementation to experiment with.

--Guido van Rossum (python.org/~guido)

More information about the Python-Dev mailing list