New submission from Clint Hepner <clint.hep...@gmail.com>:
I expected to be able to pass None as an explicit count to itertools.repeat to get the default behavior of an infinite iterator: >>> list(islice(repeat(1), 10)) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] >>> list(islice(repeat(1, None), 10)) Traceback (most recent call last): File "<stdin>", line 1 in <module> TypeError: 'NoneType' object cannot be interpreted as an integer ---------- components: Library (Lib) messages: 322010 nosy: chepner priority: normal severity: normal status: open title: itertools.repeat does not accept None as an explicit count versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34169> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com