+ 1
what is the SELF object in python ?
why do we use the self object in every function definition.
2 Answers
+ 1
self object is an instance of the class you are in. It's usefull when for example your class has a variable named test and the constructor receives a parameter called test too. The only way to distinguish these 2 things is to use self when you refer to the class member and nothing when you refer to the parameter.
0
thank u