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

Alexander Belopolsky alexander.belopolsky at gmail.com
Fri Nov 3 04:36:59 CET 2006

On Nov 2, 2006, at 9:25 PM, Greg Ewing wrote:

> 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.

Correct, assuming Travis' approach is accepted.  However I understood  
that Martin was suggesting that ctypes types should be used to  
describe the structure of the buffer.  Thus a buffer containing 10  
integers would report its datatype as c_int*10.

I was probably mistaken and Martin was suggesting the same as you.   
In this case extended buffer protocol would still use a different  
model from ctype and "don't reinvent the wheel" argument goes away.

More information about the Python-Dev mailing list