Strange range
Marko Rauhamaa
marko at pacujo.net
Fri Apr 1 16:44:57 EDT 2016
Rob Gaddi <rgaddi at highlandtechnology.invalid>:
> Marko Rauhamaa wrote:
>> There's a bit of a cognitive dissonance between iterables and iterators.
>> On the one hand, they behave identically in many contexts. On the other
>> hand, the distinction is crucial in some special cases.
>
> You're missing a key point. All (well-behaved) iterators are iterables,
> with their __iter__ method returning themselves.
I don't know what I'm missing.
Marko
More information about the Python-list
mailing list