Static member variables
Jerome Quelin
jerome.quelin at insalien.org
Sun Jul 9 17:04:24 EDT 2000
More information about the Python-list mailing list
Sun Jul 9 17:04:24 EDT 2000
- Previous message (by thread): Static member variables
- Next message (by thread): Static member variables
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Thomas Svensson" <thomas_s at ebox.tninet.se> wrote: >Is there a way of declaring static (and constant) member variables in >classes? I have a member variable that should be unique for each class >type and thus should not waste memory for each instance of the class I >create. Something like the __doc__ string I guess. And is it possible to have a static method (ie, a class method in C++ jargon) ? >>> class t: .. def t(): .. print "t.t" >>> t.t() Traceback (innermost last): File "<stdin>", line 1, in ? TypeError: unbound method must be called with class instance 1st argument But the t() method does not wait for any arguments... Regards, Jerome -- jerome.quelin at insalien.org
- Previous message (by thread): Static member variables
- Next message (by thread): Static member variables
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list