In this answer, we have explained about difference between staticmethod and classmethod. Maybe a bit of example code will help: Notice the difference in the call signatures of foo, class_foo and static_foo:
def foo(self, x):
print "executing foo(%s, %s)" % (self, x)
def class_foo(cls, x):
print "executing class_foo(%s, %s)" % (cls, x)
print "executing static_foo(%s)" % x
a = A()
Below is the usual way an object instance calls a method. The object instance, a, is implicitly passed as the first argument.
# executing foo(<__main__.A object at 0xb7dbef0c>,1)
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.