Raymond Hettinger <[EMAIL PROTECTED]> writes:

> [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").

Using PY_LONG_LONG for the counter, and PyLong_FromLongLong to create
the Python number should work well for huge sequences without
(visibly) slowing down the normal case.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to