[Python-Dev] PEP 380 (yield from a subgenerator) comments

Jesse Noller jnoller at gmail.com
Fri Mar 27 13:33:47 CET 2009

On Fri, Mar 27, 2009 at 5:56 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> Greg Ewing <greg.ewing <at> canterbury.ac.nz> writes:
>> It's not really about doing away with trampolines anyway.
>> You still need at least one trampoline-like thing at the
>> top. What you do away with is the need for creating
>> special objects to yield, and the attendant syntactic
>> clumisiness and inefficiencies.
> No you don't, not in the Twisted case. The fact that useful library routines
> return Deferred objects to which you add callbacks and errbacks is probably not
> going away, because it's a fundamental building block in Twisted, not a
> convenience for scheduling generators.
> As a matter of fact, the people whom this PEP is supposed to benefit haven't
> expressed a lot of enthusiasm right now. That's why it looks so academic.
> Regards
> Antoine.

That's because most of us who might like this have been patently
avoiding this thread.

I like the syntax, I'm iffy on the exception other than stop iteration
(but I lost track on what was decided on this) and I would like to see
this go in. I think this is going to be a power user feature for
awhile, but I will like to see the libraries that will come of this, I
think this does enhance things.

Also, I know David Beazley did a tutorial here at pycon on
implementing coroutines and I'd be interested to see what he thinks of
this as well. I'll see if I can get his opinion.


More information about the Python-Dev mailing list