Message 194707 - Python tracker (original) (raw)
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) True m = memoryview(b) isinstance(m, collections.Sequence) False
It would be nice if memoryview was registered with the Sequence ABC and MutableSequence for writeable memoryviews.