L Instantiate operations directly with = , such as p=people ()
L for attributes, preceded by two underscore __ indicates the property of the private
L define the method with the DEF keyword, define the method in the class at least one parameter, if you use self as the argument, it must be the first argument, for self, with C + + or This is similar in Java , and when the method is called with an object, the first parameter of the object is passed to the self
L built-in methods in a class
N The constructor method __init__ (self,....) initializes the object when it is generated and does not require an explicit call
N destructor method __delf__ (self_) is called when the object is disposed, supports overloading
L class Properties and instance Properties
N class properties are common to all instance objects, which can be found directly through the class, People.name, of course p.name (p is an instance of class people)
N
Python Object-oriented (self-Learning Python series notes-2) (not updated regularly)