Defining inheritance in C extensions

Timo Savola timo.savola at iki.fi
Thu Nov 8 18:15:18 EST 2001


Hello. I'm new to this list, and relatively new to Python (played around
with it every now and then, and used it as a calculator :).

Now I'm doing an extension module, or rather a system that I want to
control via Python. I have a C++ class hierarchy that I want to be
accessible from Python. I can't figure out how to make a type object a
subclass of another type object, so that I can do type checking in the
Python wrappers of my methods.

I've been browsing the Extending and Embedding section of the Python
documentation (version 2.2). Is it just me, or has the Defining New
Types section fallen short? It doesn't say anything about /* Attribute
descriptor and subclassing stuff */...

Is there a more extensive reference to extending Python, or maybe some
comprehensive example code on the subject?

Thanks in advance. :)

Timo





More information about the Python-list mailing list