Jan. 27, 2015
10:38 p.m.
Hi all, If I create foo.pyx with the following contents: cpdef object foo(): cdef unsigned char[:] s = <bytearray><unsigned char *>"012345" return s I notice the following behavior: $ python -c ' import foo m=foo.foo() print repr(memoryview(m.base).tobytes()) print repr(memoryview(m).tobytes()) ' '012345' '123450' Notice how the bytes are printed in the wrong order unless I use the original buffer object via the typed memoryview object's base attribute. -Richard