
Feb. 19, 2009
10:06 p.m.
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