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
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