Static Methods and Class Methods : Static « Class « Python Tutorial






class MyClass:
    @staticmethod
    def smeth():
        print 'This is a static method'

    @classmethod
    def cmeth(cls):
        print 'This is a class method of', cls

MyClass.smeth()
MyClass.cmeth()








11.14.Static
11.14.1.Static Methods and Class Methods
11.14.2.Using Decorators
11.14.3.Class Employee with a static method.