Tom Gur a écrit :
>> Look for @staticmethod inhttp://docs.python.org/lib/built-in-funcs.html
>>
>> Example:
>> class C:
>>     @staticmethod
>>     def f(arg1, arg2, ...): ...
> 
> 
> Oops, sorry for the confusion - I've actually meant a static method,
> and Gerald's answer works fine.

FWIW, staticmethods in Python are of very restricted use - we have 
modules and functions for this. And you may be interested in 
classmethods (methods that takes the class object instead of the 
instance as first argument).

As a last word : trying to write Java in Python wis certainly not the 
best option. Better to learn to write Python.

http://dirtsimple.org/2004/12/python-is-not-java.html
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to