This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: memoryview not considered a sequence
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ncoghlan Nosy List: mark.dickinson, ncoghlan, python-dev, sfeltman, skrah
Priority: normal Keywords:

Created on 2013-08-08 20:38 by sfeltman, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg194707 - (view) Author: Simon Feltman (sfeltman) Date: 2013-08-08 20:38
This was a bit unexpected as memoryviews support all the methods of the Sequence abstract base class:

>>> import collections
>>> b = bytearray(b'asdf')
>>> isinstance(b, collections.Sequence)
>>> m = memoryview(b)
>>> isinstance(m, collections.Sequence)

It would be nice if memoryview was registered with the Sequence ABC and MutableSequence for writeable memoryviews.
msg198830 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2013-10-02 12:23
There's no ducktyping for this due to the Sequence/Mapping confusion so it's a simple missing explicit registration.
msg198831 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-02 12:32
New changeset 95badf936353 by Nick Coghlan in branch 'default':
Close #18690: register memoryview with Sequence ABC
Date User Action Args
2022-04-11 14:57:49adminsetgithub: 62890
2013-10-02 12:32:17python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg198831

resolution: fixed
stage: resolved
2013-10-02 12:23:46ncoghlansetassignee: ncoghlan

messages: + msg198830
nosy: + ncoghlan
2013-08-09 08:05:37pitrousetnosy: + mark.dickinson, skrah

type: behavior -> enhancement
versions: - Python 3.1, Python 2.7, Python 3.2, Python 3.3, Python 3.5
2013-08-08 20:38:26sfeltmancreate