Message193764
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. |
|
Date |
User |
Action |
Args |
2013-07-26 23:28:20 | terry.reedy | set | recipients:
+ terry.reedy, r.david.murray, Zero, docs@python |
2013-07-26 23:28:20 | terry.reedy | set | messageid: <1374881300.41.0.724065168772.issue18558@psf.upfronthosting.co.za> |
2013-07-26 23:28:20 | terry.reedy | link | issue18558 messages |
2013-07-26 23:28:20 | terry.reedy | create | |
|