[issue29300] Modify the _struct module to use FASTCALL and Argument Clinic

Martin Panter report at bugs.python.org
Thu Feb 2 07:24:31 EST 2017


Martin Panter added the comment:

FYI Victor, you can make non-C-contiguous buffers by slicing memoryview:

>>> struct.unpack(">L", memoryview(b"1234")[::-1])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
BufferError: memoryview: underlying buffer is not C-contiguous

Can also use the built-in _testbuffer module to create stranger buffers.

----------
resolution:  -> fixed

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


More information about the Python-bugs-list mailing list