[pypy-issue] Issue #2831: memoryview format is incomplete (pypy/pypy)

mattip issues-reply at bitbucket.org
Thu May 17 06:21:17 EDT 2018

New issue 2831: memoryview format is incomplete


the following script
from __future__ import print_function
import ctypes

a = memoryview(ctypes.c_uint8())
b = memoryview(ctypes.pointer(ctypes.c_uint8()))

print('uint8 format', a.format)
print('&uint8 format', b.format)

on cpython 2 or 3 prints
uint8 format <B
&uint8 format &<B

but on pypy 2 or 3.5 prints
uint8 format B
&uint8 format B
the lack of `&` in the view to a pointer causes a numpy test to fail

More information about the pypy-issue mailing list