deque is not a subclass of Sequence.

Antoon Pardon antoon.pardon at rece.vub.ac.be
Thu Apr 7 04:49:23 EDT 2016


Playing around with the collections and collections.abc modules in
python3.4 I stumbled upon the following: >>> from collections.abc import
Sequence >>> from collections import deque >>> isinstance(list(),
Sequence) True >>> isinstance(deque(), Sequence) False >>> This seems
strange to me. As far as I understand, the documentation indicates there
is no reason why deque shouldn't be a subclass of Sequence. Am I missing
something or can this be considered a bug? -- Antoon.




More information about the Python-list mailing list