[Tutor] Python C API - Defining New Classes with Multiple Inheritance

Logan McGrath logan at loganmcgrath.com
Fri Dec 24 03:14:18 CET 2010


Hi, I've just started using the Python C API for version 2.7.1, and I've 
got a question!

How do you define a new type which inherits from multiple types? I've 
been browsing the source code for Python 2.7.1 but I'm having a tough 
time finding examples. I see that MySQLdb defines low-level classes in 
the module "_mysql" using the C API, then extends from them using 
Python, but I want to keep as much of this in C as I can.

Any help would be much appreciated!

Thanks,
Logan



More information about the Tutor mailing list