[issue10059] add the method `index` to collections.deque
Daniel Stutzbach
report at bugs.python.org
Sun Oct 10 07:36:33 CEST 2010
Daniel Stutzbach <daniel at stutzbachenterprises.com> added the comment:
Hello Simon,
Accessing an arbitrary element of a deque takes O(n) time, making your .index implementation O(n**2).
If you describe the kinds of operations that you need to perform efficiently, we may be able to suggest a better data structure for you to use.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10059>
_______________________________________
More information about the Python-bugs-list
mailing list