I'm writing a Python class in C. In python code I use this as base class for other classes written in Python.
I need to call based class __init__
function.
To do this I need to declare class base on object referring to this article How to call Base Class's __init__ method from the child class?
How to do this with PyClass_New
?
I call it like this:
PyObject *moduleDict = PyModule_GetDict(ricc_module);
PyObject *classDict = PyDict_New( );
PyObject *className = PyString_FromString("Device");
PyObject *fooClass = PyClass_New(NULL, classDict, className);