I think you could as well, after PyType_Ready() is called, set it
yourself with
PyObject_SetAttrString(FooType, "Bar", FooBarType);
You *may* have to cast the FooType and FooBarType to (PyObject *), to
avoid compiler warnings.
I tried this. Its shorter and and works fine, too. thanks for the
pro
harold fellermann <[EMAIL PROTECTED]> writes:
>> I am working on a C extension module that implements a bunch of
>> classes. Everything
>> works fine so far, but I cannot find any way to implement class
>> attributes or inner
>> classes. Consider you have the following lines of Python :
>>
>> clas
I am working on a C extension module that implements a bunch of
classes. Everything
works fine so far, but I cannot find any way to implement class
attributes or inner
classes. Consider you have the following lines of Python :
class Foo :
class Bar :
pass
spam = "foo