[Python-ideas] x=(yield from) confusion [was:Yet another alternative name for yield-from]

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Apr 6 04:40:07 CEST 2009

Guido van Rossum wrote:

> Throwing in GeneratorExit and catching the ReturnFromGenerator
> exception would have the same problem though, so I'm not sure I buy
> this argument.

I'm not advocating doing that. My view is that both
calling close() on the generator and throwing
GeneratorExit into it are things you only do to
make sure the generator cleans up. You can't
expect to get a meaningful return value either


More information about the Python-ideas mailing list