create a new instance in C of a Python subclass

Paul Miller paul at fxtech.com
Tue Apr 15 14:42:15 EDT 2003


I've got a C extension type that is subclassed in Python. In C, I want to
create a new instace of the subclass, which I have a pointer to. What
magical incantation will allow this? I'm assuming some combination of
PyObject_New and PyObject_Init are required, using the ob->ob_type pointer?






More information about the Python-list mailing list