class myClass: def smeth(): print("smeth function") smeth = staticmethod(smeth) def cmeth(cls): print("cmeth function") cmeth = classmethod(cmeth) print(myClass.cmeth()) print(myClass.smeth())
result:
cmeth function
None
smeth function
None
class myClass: def smeth(): print("smeth function") smeth = staticmethod(smeth) def cmeth(cls): print("cmeth function") cmeth = classmethod(cmeth) print(myClass.cmeth()) print(myClass.smeth())
result:
cmeth function
None
smeth function
None