[Python-ideas] yield from multiple iterables (was Re: The async API of the future: yield-from)
Christian Tismer
tismer at stackless.com
Fri Oct 19 14:55:57 CEST 2012
Hi Nick,
On 16.10.12 03:49, Nick Coghlan wrote:
> On Tue, Oct 16, 2012 at 10:44 AM, Greg Ewing
> <greg.ewing at canterbury.ac.nz> wrote:
>> My original implementation of yield-from actually *did* avoid
>> this, by keeping a C-level pointer chain of yielding-from frames.
>> But that part was ripped out at the last minute when someone
>> discovered that it had a detrimental effect on tracebacks.
>>
>> There are probably other ways the traceback problem could be
>> fixed, so maybe we will get this optimisation back one day.
> Ah, I thought I remembered something along those lines. IIRC, it was a
> bug report on one of the alphas that prompted us to change it.
>
I was curious and searched quite a lot.
It was v3.3.0a1 from 2012-03-15 as a reaction to #14230 and #14220
from Marc Shannon, patched by Benjamin.
Now I found the original implementation. That looks very much
as I'm thinking it should be.
Quite a dramatic change which works well, but really seems to remove
what I would call "now I can emulate most of Stackless" efficiently.
Maybe I should just try to think it would be implemented as before,
build an abstraction and just use it for now.
I will spend my time at PyCon de for sprinting on "yield from".
cheers - chris
--
Christian Tismer :^) <mailto:tismer at stackless.com>
Software Consulting : Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121 : *Starship* http://starship.python.net/
14482 Potsdam : PGP key -> http://pgp.uni-mainz.de
phone +49 173 24 18 776 fax +49 (30) 700143-0023
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/
More information about the Python-ideas
mailing list