[Python-ideas] Yield-From: Handling of GeneratorExit
steve at pearwood.info
Fri Apr 3 03:57:37 CEST 2009
On Fri, 3 Apr 2009 11:18:25 am Greg Ewing wrote:
> 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?
Perhaps I've missed something, but it seems to me that the right limit
to use would be the recursion limit, and the right exception to raise
would be RecursionError rather than RuntimeError.
More information about the Python-ideas