+ 3

We can use other thing in class than self than why is so much importance to it

13th Apr 2017, 11:50 AM
Sanskar sharma
Sanskar sharma - avatar
2 Réponses
+ 4
It is a convention, so that each code would be easily and intuitively readable by all the community.
13th Apr 2017, 2:12 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 1
Actually you can use any name besides "self", but you still need that name to properly refer to the object being used inside a method.
13th Apr 2017, 1:48 PM
Álvaro