[Python-Dev] idea for data-type (data-format) PEP

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Nov 3 03:25:15 CET 2006


Alexander Belopolsky wrote:

> My main concern was that in ctypes the size of an array is a part of  
> the datatype object and this seems to be redundant if used for the  
> buffer protocol.  Buffer protocol already reports the size of the  
> buffer as a return value of bf_get*buffer methods.

I think what would happen if you were interoperating with
ctypes is that you would get a datatype describing one
element of the array, together with the shape information,
and construct a ctypes array type from that. And going
the other way, from a ctypes array type you would extract
an element datatype and a shape.

--
Greg


More information about the Python-Dev mailing list