0

meaninig of this thing

guys please tell me what is the meaning of (x.y) in python an example for this : self.class_name = "goblin" i didnt understood what is the meaning of this dot in between two variables.

20th Aug 2020, 1:13 PM
Bhushan maghade
Bhushan maghade - avatar
1 Respuesta
+ 4
Python uses Dot Notation (You should research this more) and this notation is how Python access Local Variables within a Class's Function. The "self" keyword is used as the first argument, but the "self" keyword can be any word you choose, but by convention, it is "self". Once the variables have been instantiated, they can be accessed through the Class, using Dot Notation.
20th Aug 2020, 1:18 PM
Steven M
Steven M - avatar