26 Mar
2009
26 Mar
'09
2:35 a.m.
Jacob Holm wrote:
It fails to handle the case where the throw raises a StopIteration (or there is no throw method and the thrown exception is a StopIteration).
No, I think it does the right thing in that case. By the inlining principle, the StopIteration should be thrown in like anything else, and if it propagates back out, it should stop the delegating generator, *not* the subiterator. -- Greg