Re: Class data members in C

2007-01-18 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, "Hendrik van Rooyen" <[EMAIL PROTECTED]> writes: |> |> > Oh, one of the first two - I am not bonkers! Changing a class after |> > instance creation is guaranteed to cause confusion, if nothing else. |> > |> *grin* - its also just about impossible to do, if you tr

Re: Class data members in C

2007-01-17 Thread Hendrik van Rooyen
"Nick Maclaren" <[EMAIL PROTECTED]> wrote: > > In article <[EMAIL PROTECTED]>, > "Hendrik van Rooyen" <[EMAIL PROTECTED]> writes: > |> > > |> > Hmm. The extensions documentation describes how to add instance > |> > members to a class (PyMemberDef), but I want to add a class member. > |> > Yes,

Re: Class data members in C

2007-01-17 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, "Hendrik van Rooyen" <[EMAIL PROTECTED]> 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. |> |> Wh

Re: Class data members in C

2007-01-17 Thread Hendrik van Rooyen
"Nick Maclaren" <[EMAIL PROTECTED]> 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

Re: Class data members in C

2007-01-16 Thread Ziga Seilnacht
Nick Maclaren 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? Add something like this to your PyMODINIT_FUNC after you have init

Class data members in C

2007-01-16 Thread Nick Maclaren
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? Regards, Nick Maclaren. -- http://mail.python.org/mailman/listinfo/python-list