[issue19803] memoryview complain ctypes byte array are not native single character
Stefan Krah
report at bugs.python.org
Fri Nov 29 12:07:39 CET 2013
Stefan Krah added the comment:
>>> class B1(ctypes.Structure):
... _fields_ = [("data", ctypes.c_uint8 * 256), ]
... _pack_ = 1
...
>>> a= B1()
>>> x = memoryview(a)
>>> x.format
'B'
In the first case the format is 'B', in the second case the
format is:
>>> x = memoryview(b)
>>> x.format
'T{(256)<B:data:}'
While the latter is probably a valid PEP 3118 format, it's
not implemented anywhere outside ctypes See #3132.
----------
components: +Interpreter Core -Library (Lib), ctypes
resolution: -> duplicate
stage: -> committed/rejected
status: open -> closed
superseder: -> implement PEP 3118 struct changes
type: -> behavior
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19803>
_______________________________________
More information about the Python-bugs-list
mailing list