[issue22939] integer overflow in iterator object

Clement Rouault report at bugs.python.org
Mon Dec 22 16:36:13 CET 2014


Clement Rouault added the comment:

> > The call to PySequence_GetItem() may be expensive, and we have to drop
> > the result if an OverflowError is raised after the call.

> You do realize that this error will be very rare and therefore inconsequential.

The real question is: why would you call the iterator for a new value if it will be discarded anyway ? I think it could be very misleading to see  _getitem__ being called and have an OverflowError being raised afterward.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22939>
_______________________________________


More information about the Python-bugs-list mailing list