[Python-Dev] PEP: Adding data-type objects to Python
greg.ewing at canterbury.ac.nz
Tue Oct 31 00:36:46 CET 2006
Travis Oliphant wrote:
> Part of the problem is that ctypes uses a lot of different Python types
> (that's what I mean by "multi-object" to accomplish it's goal). What
> I'm looking for is a single Python type that can be passed around and
> explains binary data.
It's not clear that multi-object is a bad thing in and
of itself. It makes sense conceptually -- if you have
a datatype object representing a struct, and you ask
for a description of one of its fields, which could
be another struct or array, you would expect to get
another datatype object describing that.
Can you elaborate on what would be wrong with this?
Also, can you clarify whether your objection is to
multi-object or multi-type. They're not the same thing --
you could have a data structure built out of multiple
objects that are all of the same Python type, with
attributes distinguishing between struct, array, etc.
That would be single-type but multi-object.
More information about the Python-Dev