Using Decorators : Static « Class « Python Tutorial






class TestStaticMethod:
    @staticmethod
    def foo():
        print 'calling static method foo()'

class TestClassMethod:
    @classmethod
    def foo(cls):
        print 'calling class method foo()'
        print 'foo() is part of class:', cls.__name__








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.