mark florisson, 27.06.2012 11:54: > if anyone would like to pick up the release for 0.17, I'd be much > obliged.
I think I can handle it. :) > I can't test it right now, but I don't understand the following in the > release notes (regarding array.array): "Note that only the buffer > syntax is supported for these arrays. To use memoryviews with them, > use the buffer syntax to unpack the buffer first.". Why is that, it > implements __getbuffer__ right? So it shouldn't matter whether you use > memoryviews or buffer syntax, both use __Pyx_GetBuffer(). The problem is that arrayarray.pxd is only used when the exporter is typed. This means that you can't do this: def func(int[:] arr): pass func(array.array('i', [1,2,3])) but it will work if func() is defined like this: def func(array.array arr): cdef int[:] view = arr I admit that the wording in the release notes is wrong, I wrote it because I initially thought that you had to do this: def func(array.array[int] arr): cdef int[:] view = arr But no, you don't have to use the buffer interface, you just have to type the variable. I'll update the release notes. Works better in Py3, obviously. Stefan _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel