New submission from Marcos Dione: If the `step` parameter for `itertools.count()` rounds to 1 (f.i., 1.1, 1.437643, 1.99999), then it fallsback to fast (integer) mode and increases the counter by 1. Here's an example:
Python 3.6.0a4+ (default:ddc95a9bc2e0+, Sep 8 2016, 14:46:19) >>> import itertools >>> for i in itertools.count(1, step=1.5): ... print(i) ... if i > 10: ... break 1 2 3 4 5 6 7 8 9 10 11 ---------- components: Library (Lib) messages: 275007 nosy: StyXman priority: normal severity: normal status: open title: itertools.count() falls back to fast (integer) mode when step rounds to 1 type: behavior versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28019> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com