[Python-ideas] Yield-From: Handling of GeneratorExit
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Apr 3 03:45:01 CEST 2009
Jacob Holm wrote:
> There has been requests for a function that loops over the
> generator and returns the final result, but this version of close
> doesn't fit that use case
That has nothing to do with closing behaviour. Such a
function wouldn't close() the subgenerator, it would
just keep calling next() until it finishes naturally
and catch the GeneratorReturn.
--
Greg
More information about the Python-ideas
mailing list