class Yoba: @staticmethod def foo(f): print("foo") def wrapper(*args, **kwargs): print("wrapper") f(*args, **kwargs) return wrapper @foo def bar(self): Yoba.foo() print(Yoba().foo == Yoba.foo)Yoba().bar()
Standard input is empty
Standard output is empty
Traceback (most recent call last): File "./prog.py", line 1, in <module> File "./prog.py", line 10, in Yoba TypeError: 'staticmethod' object is not callable
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!