[issue29178] Adding bytes.frombuffer(byteslike) constructor

INADA Naoki report at bugs.python.org
Sat Jan 7 22:41:20 EST 2017


INADA Naoki added the comment:

You're right!  How difficult working with memoryview!

> The memoryview constructor could take start, stop, and step keyword-only arguments to avoid having to immediately slice a new view.

Maybe, memoryview.to_bytes() is better place to add such options.

memoryview(x) can accept multi dimensional arrays, and itemsize can be >=1.
It's too complex when working with byte sequence.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29178>
_______________________________________


More information about the Python-bugs-list mailing list