[Python-ideas] Yield-From: Handling of GeneratorExit

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Apr 3 02:18:25 CEST 2009


Nick Coghlan wrote:

> I think I'd prefer to see some arbitrary limit (500 seems like a nice
> round number) on the number of times that GeneratorExit would be thrown
> before giving up

Is it really worth singling out this particular way
of writing an infinite loop?

If you're catching GeneratorExit then you presumably
have the need to clean up and exit on your mind, so
I don't think this is a likely mistake to make.

-- 
Greg




More information about the Python-ideas mailing list