Closed xmsid closed 6 years ago
Instance method’s first argument always represents “self
”.
Class medod’s first argument always represents ”cls
” and must be decorated with @classmethod
Static method doesn’t have a “magic” first argument and must be decorated with @staticmethod
Your example is showing a regular instance method.
@Kronuz so should i use
@staticmethod
? is my way of declaration wrong?
i just re-readed the python doc, my way of declaration is wrong, Thanks. close the issue
when i use python and make a class without the () and without putting a "self" arg in every func example:
class common:
def HulloWorld(arg1,arg2,arg3):
print('Hullo World!')
and when i import the module it gives me the args like thisUtilities.common.HulloWorld(arg2,arg3)
it expects a "self" arg and removes the first arg. i think that's pretty easy to solve :)