Neil Girdhar added the comment: My suggestion is then to update collection.abc to have an InfiniteSequence, which inherits from Iterable, and adds abstract methods __getitem__ and mixin methods __iter__.
Then, itertools count, cycle, and repeat could implement collection.abc.InfiniteSequence, and collections.abc.Iterator (for backwards-compatibility). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16540> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com