class attributes and inner classes in C extensions

harold fellermann harold.fellermann at upf.edu
Fri Apr 1 13:49:25 EST 2005


> 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 
proposal.

- harold -

--
I wish there was a knob on the TV to turn up the intelligence.
There's a knob called "brightness", but it doesn't seem to work.
-- Gallagher




More information about the Python-list mailing list