+ 1
What is the 'self' keyword used for?
Python Self Keyword
5 Respostas
+ 11
See SoloLearn's Python course > Object oriented programming > Class, lesson 2:
'All methods must have self as their first it isn't explicitly passed, Python adds the self argument to the list for you; you do not need to include it when you call the methods. Within a method definition, self refers to the instance calling the method.'
+ 6
The self keyword is like the 'this' keyword in other programming languages.
+ 2
For object-oriented programming.
+ 1
self keyword is used for refering object wich implemented by a class.
0
the self keyword is used in Python to access on the current object inside the class