classmethod & staticmethod

james_027 cai.haibin at gmail.com
Tue Jul 24 05:19:05 CEST 2007


hi,

python's staticmethod is the equivalent of java staticmethod right?

with classmethod, I can call the method without the need for creating
an instance right? since the difference between the two is that
classmethod receives the class itself as implicti first argument. From
my understanding classmethod are for dealing with class attributes?

Can somebody teach me the real use of classmethod & staticmethod?

Thanks
james




More information about the Python-list mailing list