> From Python, you create a Noddy object by *calling* its type. Do the same > in C: > > return PyObject_CallObject((PyObject *) &NoddyType, NULL); > > Or any other suitable variant of PyObject_CallXXX. (I've answered this > same question yesterday, when I was not sure about this; then I've tried > it and it appears to be working. But I've not read any docs telling this > is *the* right way to create an object).
Many thanks. That seems to work now. It turns out that my previous problems stemmed from defining my type as a static, so I was ending up with multiple copies of it and of course only one type was getting fully initialized when the module was launched! -- http://mail.python.org/mailman/listinfo/python-list