[Python-ideas] Revised^4 PEP on yield-from

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Feb 20 01:48:29 CET 2009

Antoine Pitrou wrote:
> However, if there
> isn't a specialized optimization in the interpreter, it will also probably be
> slower (because it switches between frames a lot

That's true, but I'm 99.9% sure that if it's implemented
at all then it will be implemented fairly efficiently,
because doing so is actually easier than implementing
it inefficiently.:-)

> (my opinion on your PEP being that it brings the complication inside the
> interpreter itself, especially if you want to implement the feature in an
> optimized way.

Bringing it into the interpreter is what makes it
possible, and fairly straightforward, to implement
it efficiently. Hopefully this will become clearer
when I get a reference implementation going.


More information about the Python-ideas mailing list