[ python-Bugs-1512504 ] builtin enumerate overflows

SourceForge.net noreply at sourceforge.net
Mon Jun 26 10:50:13 CEST 2006


Bugs item #1512504, was opened at 2006-06-26 08:50
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1512504&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: James Harlow (hythloday)
Assigned to: Nobody/Anonymous (nobody)
Summary: builtin enumerate overflows

Initial Comment:
The index that the builtin function enumerate() returns
is a mere integer and will wrap back to a negative
number when it overflows. This seems to be by design
(unless I'm misunderstanding the point of
PyInt_FromLong), but is sufficiently surprising that
I'd suggest it's a bug anyway. I've attached a test
case - it takes a while to execute, but the results are
so deeply exciting that it's worth doing just for fun!

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1512504&group_id=5470


More information about the Python-bugs-list mailing list