deque is not a subclass of Sequence.
Antoon Pardon
antoon.pardon at rece.vub.ac.be
Thu Apr 7 05:25:00 EDT 2016
Op 07-04-16 om 11:12 schreef Peter Otten:
>
>>>> from collections import deque
>>>> from collections.abc import Sequence
>>>> [name for name in set(dir(Sequence)) - set(dir(deque)) if not
> name.startswith("_")]
> ['index']
>
> So the index() method seems to be what is missing.
the index() method seems to be added in 3.5, so is deque
a subclass of Sequence in 3.5?
--
Antoon.
More information about the Python-list
mailing list