You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 this Utilities.common.HulloWorld(arg2,arg3)
it expects a "self" arg and removes the first arg.
i think that's pretty easy to solve :)
The text was updated successfully, but these errors were encountered:
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.
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 this
Utilities.common.HulloWorld(arg2,arg3)
it expects a "self" arg and removes the first arg.
i think that's pretty easy to solve :)
The text was updated successfully, but these errors were encountered: