Serhiy Storchaka added the comment: Raymond's patch looks even more cumbersome than previous code. And it doesn't work in some cases:
>>> it = itertools.cycle([-2, -1]) >>> class Index: ... def __index__(self): return next(it) ... >>> itertools.repeat(42, times=Index()) repeat(42, -1) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19145> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com