classmethod & staticmethod

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


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?


More information about the Python-list mailing list