Defining inheritance in C extensions

Timo Savola timo.savola at iki.fi
Fri Nov 9 11:09:08 EST 2001


On Fri, 2001-11-09 at 15:08, Martin von Loewis wrote:

> However, I'd argue that you don't need to reflect the C++ hierarchy in
> the Python types at all: just make the Python types completely
> unrelated to each other.

I could do the type checking apart from the Python types, but I think it
would be a good idea to do it "properly" since it's apparently possible.
If my types are be compatible with their base types,
PyArg_ParseTuple(args,"O!:abc",&basetype,&ptr) would do the checking for
me, or does it check for the *exact* type? Also, I like player with
powerful RTTI. :)

Timo





More information about the Python-list mailing list