[issue23086] Add start and stop parameters to the Sequence.index() ABC mixin method
Serhiy Storchaka
report at bugs.python.org
Fri Jan 9 09:46:28 CET 2015
Serhiy Storchaka added the comment:
I afraid that the patch can change computational complexity. The iteration usually has linear complexity, but indexing can has non-constant complexity. E.g. for linked list it will cause quadratic complexity of index(). May be we should have special case for start=0 and stop=None. And document this.
----------
nosy: +serhiy.storchaka
stage: -> patch review
type: -> enhancement
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23086>
_______________________________________
More information about the Python-bugs-list
mailing list