Dangerous behavior of list(generator)
Gregory Ewing
greg.ewing at canterbury.ac.nz
Wed Dec 16 18:48:22 EST 2009
exarkun at twistedmatrix.com wrote:
> Which is unfortunate, because it's not that hard to get StopIteration
> without explicitly raising it yourself and this behavior makes it
> difficult to debug such situations.
It might not be hard if you set out to do it, but in
my experience it's pretty rare to end up getting a
StopIteration raised accidentally in an unexpected
place.
--
Greg
More information about the Python-list
mailing list