__dict__
as per a \"normal\" class would have were it defined in Python?
I haven't done this, I'm embarrasingly bad on using the C-API, but according to the docs it should be enough with using PyObject_GenericGetAttr
and PyObject_GenericSetAttr
for the getattro
and setattro
methods. You also need to have a PyObject attribute called __dict__
of course.
Have you tried that?