Class data members in C
Hendrik van Rooyen
mail at microcorp.co.za
Wed Jan 17 01:17:35 EST 2007
"Nick Maclaren" <nmm1 at cus.cam.ac.uk> wrote:
>
> Hmm. The extensions documentation describes how to add instance
> members to a class (PyMemberDef), but I want to add a class member.
> Yes, this is constant for all instances of the class.
>
> Any pointers?
When? - at time of defining base class, between class definition and
first instance, at time of creating instance, or after instance creation?
After instance creation is not easy, I think you would have to add
to each instance...
But then, I may be wrong - I often am.
- Hendrik
More information about the Python-list
mailing list