self parameter member methods
self argument:
- Just a parameter
- In the use of the object when the current object as an argument will be the first argument passed
- self equivalent language pronouns, represents the current object itself (in other languages also use this)
- The role of the role of self connected object throughout all of the information, the bridge
- self is not a keyword, it is just a parameter variable name, you can use other words instead of (ban in place)
Classification: 1. 2. unbound binding class method class methods
Sport class ():
head =. 1
legs' = 2
DEF RUN (Self): represents the object itself #self
# Print (Self)
Print (self.legs, 'now run up too similar floating') # Dynamic
print (Sport .legs, 'Gone with the run up was like') # static
Berte = Sport ()
berte.legs = 1
berte.run ()
# Print ( '================ == ')
# Sport.run (. 1)