[issue23086] Add start and stop parameters to the Sequence.index() ABC mixin method
Raymond Hettinger
report at bugs.python.org
Fri Jan 9 16:58:12 CET 2015
Raymond Hettinger added the comment:
> The iteration usually has linear complexity
The iteration abstract method depends on indexing as well:
def __iter__(self):
i = 0
try:
while True:
v = self[i]
yield v
i += 1
except IndexError:
return
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23086>
_______________________________________
More information about the Python-bugs-list
mailing list