[issue40440] allow array.array construction from memoryview w/o copy

2020-05-06 Thread Benjamin Keen
Benjamin Keen added the comment: memoryview has a lot of overlap with array, but there are still useful methods (index and count for instance) that memoryview does not have. I don't see a workaround that will run with equivalent speed without writing some extension or adding th

[issue40440] allow array.array construction from memoryview w/o copy

2020-04-29 Thread Benjamin Keen
Change by Benjamin Keen : -- keywords: +patch pull_requests: +19121 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19800 ___ Python tracker <https://bugs.python.org/issu

[issue40440] allow array.array construction from memoryview w/o copy

2020-04-29 Thread Benjamin Keen
New submission from Benjamin Keen : Currently the array.array object can export a memoryview, but there is no way to construct one from a memoryview without making a copy of the underlying data. So in that sense array.array only supports one half of the buffer protocol and this is to allow