Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Antoon Pardon Newsgroups: comp.lang.python Subject: deque is not a subclass of Sequence. Date: Thu, 7 Apr 2016 10:49:23 +0200 Lines: 8 Message-ID: References: <57061F13.90100@rece.vub.ac.be> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de HYQvmCPAYkiYjDqJn44h/w8S/ZMuiIC6OPaYsWkrxGTg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'received:134': 0.05; 'collections': 0.09; 'indicates': 0.09; 'subclass': 0.09; 'subject:not': 0.11; 'deque': 0.16; 'received:ac.be': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'sequence.': 0.16; "shouldn't": 0.18; '>>>': 0.20; 'bug?': 0.22; 'seems': 0.23; 'import': 0.24; 'header:User-Agent:1': 0.26; 'sequence': 0.27; 'understand,': 0.29; 'received:be': 0.30; 'false': 0.35; 'something': 0.35; 'there': 0.36; 'modules': 0.36; 'to:addr :python-list': 0.36; 'missing': 0.37; 'why': 0.39; 'to:addr:python.org': 0.40; 'strange': 0.63 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqgHAIweBleGuA9G/2dsb2JhbABchFS9A4gbAQEBAQEBZoUSfwwCBSECEQJMDQgCiCOfao9djRaEfnyFJYwKglYFmASBVIw4gVGHWoVjjyRigTaCM4ldAQEB User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <57061F13.90100@rece.vub.ac.be> Xref: csiph.com comp.lang.python:106623 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.