Terry J. Reedy added the comment:

Stephen, your class, or rather instances thereof when initialized with a 
sequence, follow the old iteration protocol. You might call them iterators in 
the generic sense, though I cannot remember whether we used 'iterator' much 
before the introduction of the new and now dominant iteration protocol. I am 
sure 'iterable' was introduced with the new protocol for objects with .__iter__ 
methods that return iterators, which in this context means an object with a 
.__next__ method and excludes .__getitem__ objects.

It would have been less confusing is we had disabled the old protocol in 3.0, 
but aside from the predictable confusion, it seemed better to keep it.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18558>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to