enumerate overflow

Raymond Hettinger python at rcn.com
Wed Oct 3 13:22:03 EDT 2007


[Paul Rubin]
> I hope in 3.0 there's a real fix, i.e. the count should promote to
> long.

In Py2.6, I will mostly likely put in an automatic promotion to long
for both enumerate() and count().  It took a while to figure-out how
to do this without killing the performance for normal cases (ones used
in real programs, not examples contrived to say, "omg, see what
*could* happen").


Raymond






More information about the Python-list mailing list