[Python-ideas] Introduce collections.Reiterable

Ethan Furman ethan at stoneleaf.us
Mon Sep 23 02:48:52 CEST 2013


On 09/22/2013 05:24 PM, Neil Girdhar wrote:
> Why not just add one line?
>
> def __iter__(self): return (self.__getitem__(i) for i in itertools.count())

Why should he?  Python treats his class just fine the way it is.

--
~Ethan~


More information about the Python-ideas mailing list