[Python-ideas] Revised^4 PEP on yield-from
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Feb 19 22:06:39 CET 2009
Guido van Rossum wrote:
> Seconded -- but I would make it inherit from StopIteration so that the
> for-loop (unless modified) would just ignore it.
But is there really any good reason to use a
different exception?
Currently, 'return' without a value in an ordinary
function is equivalent to 'return None'. If this
is done, they wouldn't be equivalent in generators,
since they would raise different exceptions.
--
Greg
More information about the Python-ideas
mailing list