[Python-ideas] Yield-From: Finalization guarantees

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Mar 26 01:24:25 CET 2009

Jacob Holm wrote:

> But if you throw another exception and it is converted to a 
> StopIteration by the subiterator, this should definitely stop the 
> subiterator and get a return value.

Not if it simply raises a StopIteration from the
throw call. It would have to mark itself as
completed, return normally from the throw and
then raise StopIteration on the next call to
next() or send().


More information about the Python-ideas mailing list