class A: def foo(self): pass foo = staticmethod(foo)