When should I use @classmethod and when def method(self)?
Your guess is correct – you understand how classmethods work. The why is that these methods can be called both on an instance OR on the class (in both cases, the class object will be passed as the first argument): class Dummy(object): @classmethod def some_function(cls,*args,**kwargs): print cls #both of these will have exactly the same … Read more