Re: how to define a static field of a given class

2006-06-02 Thread feel_energetic
thanks for all of your replies I did this before I posted the subject but got (NameError: global name 'startTime' is not defined) the most important thing i didn't know is "the static field should be referred with the qualifier ClassName" it's a little different from C++ :) (the static field c

Re: how to define a static field of a given class

2006-06-02 Thread Maric Michaud
Le Vendredi 02 Juin 2006 11:47, bruno at modulix a écrit : > FWIW, it's probably one of the most useless construct in Python IMHO. > classmethod are really much more useful to me. +1 I do prefer classmethod, both for the name and behavior (everything should be intended for polymorphism, after all

Re: how to define a static field of a given class

2006-06-02 Thread bruno at modulix
feel_energetic wrote: > Hi, > > I already knew how to define a static method of a class( using > staticmethod() ), FWIW, it's probably one of the most useless construct in Python IMHO. classmethod are really much more useful to me. > but I find there isn't a built-in func to build a > static

Re: how to define a static field of a given class

2006-06-02 Thread Rob Williscroft
feel_energetic wrote in news:1149239221.045268.6170 @g10g2000cwb.googlegroups.com in comp.lang.python: > Hi, > > I already knew how to define a static method of a class( using > staticmethod() ),but I find there isn't a built-in func to build a > static field ( something like staticfield() )

Re: how to define a static field of a given class

2006-06-02 Thread Maric Michaud
Le Vendredi 02 Juin 2006 11:07, feel_energetic a écrit : > Hi, > > I already knew how to define a static method of a class( using > staticmethod() ),but I find there isn't a built-in func to build a > static field ( something like staticfield() ) > can anyone help me on this? > thanks v