Class data members in C
Nick Maclaren
nmm1 at cus.cam.ac.uk
Wed Jan 17 04:48:44 EST 2007
In article <mailman.2814.1169026003.32031.python-list at python.org>,
"Hendrik van Rooyen" <mail at microcorp.co.za> writes:
|> >
|> > 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.
|>
|> 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...
Oh, one of the first two - I am not bonkers! Changing a class after
instance creation is guaranteed to cause confusion, if nothing else.
Regards,
Nick Maclaren.
More information about the Python-list
mailing list