fork(1) download
  1. class Yoba:
  2. @staticmethod
  3. def foo(f):
  4. print("foo")
  5. def wrapper(*args, **kwargs):
  6. print("wrapper")
  7. f(*args, **kwargs)
  8. return wrapper
  9.  
  10. @foo
  11. def bar(self):
  12. Yoba.foo()
  13.  
  14. print(Yoba().foo == Yoba.foo)
  15. Yoba().bar()
Runtime error #stdin #stdout #stderr 0.02s 8688KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
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