[Python-ideas] Yield-From: GeneratorReturn exception
Greg Ewing
greg.ewing at canterbury.ac.nz
Sun Mar 29 01:47:01 CET 2009
While attempting to update the PEP to incorporate a
GeneratorReturn exception, I've thought of a potential
difficulty in making the exception type depend on
whether the return statement had a value.
Currently the StopIteration exception is created after
the return statement has unwound the stack frame, by
which time we've lost track of whether it had an
expression.
--
Greg
More information about the Python-ideas
mailing list