
March 6, 2009
11:11 a.m.
2009/3/6 Ron Adam <rrr@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