[Python-ideas] Revised**5 PEP on yield-from

Arnaud Delobelle arnodel at googlemail.com
Fri Mar 6 11:11:24 CET 2009


2009/3/6 Ron Adam <rrr at ronadam.com>:
>
>
> Greg Ewing wrote:
[...]
> So when A.next() is called it in effect does a C.next() instead. Is that
> correct?  And when C's yield statement is executed, it needs to return the
> value to A's caller.

This is what the toy python implementation that I posted last month
does.  I think Jacob Holm did something more sophisticated that does
this as well (I haven't seen it!).

> So the .next() methods need to be passed up, while the yield return path
> needs to be passed down?

Can you draw a picture? :)

-- 
Arnaud



More information about the Python-ideas mailing list