+ 1
why is used (self) in all functions of a class?
why is used (self) in all functions of a class?
2 Respostas
+ 2
It doesn’t need to be ‘self’ it can be anything, it’s just the norm. The first parameter of a method is always the object itself (self).
+ 1
“Self” is calling to the specific object of a class.