Re: Iterators of iterators

2018-11-16 Thread Ian Kelly
On Fri, Nov 16, 2018 at 8:01 AM Steve Keller wrote: > > I wonder why iterators do have an __iter__() method? I thought > iterable objects would have an __iter__() method (but no __next__()) > to create an iterator for it, and that would have the __next__() > method but no __iter__(). > > $ py

Iterators of iterators

2018-11-16 Thread Steve Keller
I wonder why iterators do have an __iter__() method? I thought iterable objects would have an __iter__() method (but no __next__()) to create an iterator for it, and that would have the __next__() method but no __iter__(). $ python3 Python 3.5.2 (default, Nov 12 2018, 13:43:14) [GCC 5