Travis Oliphant schrieb:
> So, the big difference is that I think data-formats should be 
> *instances* of a single type.

This is nearly the case for ctypes as well. All layout descriptions
are instances of the type type. Nearly, because they are instances
of subtypes of the type type:

py> type(ctypes.c_long)
<type '_ctypes.SimpleType'>
py> type(ctypes.c_double)
<type '_ctypes.SimpleType'>
py> type(ctypes.c_double).__bases__
(<type 'type'>,)
py> type(ctypes.Structure)
<type '_ctypes.StructType'>
py> type(ctypes.Array)
<type '_ctypes.ArrayType'>
py> type(ctypes.Structure).__bases__
(<type 'type'>,)
py> type(ctypes.Array).__bases__
(<type 'type'>,)

So if your requirement is "all layout descriptions ought to have
the same type", then this is (nearly) the case: they are instances
of type (rather then datatype, as in your PEP).

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to