fork(1) download
  1. class Cs:
  2. @staticmethod
  3. def static_method():
  4. print("Static method")
  5. @classmethod
  6. def class_method(cls):
  7. print("Class method")
  8. def instance_method(self):
  9. print("Instance method")
  10. i = Cs()
  11. Cs.static_method()
  12. Cs.class_method()
  13. i.instance_method()
  14.  
Success #stdin #stdout 0.02s 8736KB
stdin
Standard input is empty
stdout
Static method
Class method
Instance method