[issue32782] memoryview & ctypes: incorrect itemsize for empty array
Terry J. Reedy
report at bugs.python.org
Sun Apr 14 16:25:23 EDT 2019
Terry J. Reedy <tjreedy at udel.edu> added the comment:
https://docs.python.org/3/library/stdtypes.html#typememoryview
says "itemsize The size in bytes of each element of the memoryview"
Revising the code example to use an empty array:
>>> import array, struct
>>> m = memoryview(array.array('H', [0])
>>> m.itemsize
2
I agree that itemsize should also be non-zero for ctype formats.
----------
title: memoryview & ctypes: incorrect PEP3118 itemsize for empty array -> memoryview & ctypes: incorrect itemsize for empty array
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32782>
_______________________________________
More information about the Python-bugs-list
mailing list