[issue28019] itertools.count() falls back to fast (integer) mode when step rounds to 1

Facundo Batista report at bugs.python.org
Thu Sep 8 10:43:21 EDT 2016


Facundo Batista added the comment:

I think the fix nails it; all the problem was that the "fast" mode was wrongly detected, and all the problems (counting badly, or a bad repr, etc) is a problem after setting cnt into PY_SSIZE_T_MAX.

IIUC there is nothing special to do when step=1.0, as later on the original objects are used (they don't suffer a wrong cast to integer anymore).

----------
nosy: +facundobatista

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


More information about the Python-bugs-list mailing list