Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106623 > unrolled thread
| Started by | Antoon Pardon <antoon.pardon@rece.vub.ac.be> |
|---|---|
| First post | 2016-04-07 10:49 +0200 |
| Last post | 2016-04-07 10:49 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
deque is not a subclass of Sequence. Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-04-07 10:49 +0200
| From | Antoon Pardon <antoon.pardon@rece.vub.ac.be> |
|---|---|
| Date | 2016-04-07 10:49 +0200 |
| Subject | deque is not a subclass of Sequence. |
| Message-ID | <mailman.7.1460018974.2253.python-list@python.org> |
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.
Back to top | Article view | comp.lang.python
csiph-web