I. About constructors and destructors
1, Python has constructors and destructors, and other languages are the same. If the subclass needs to use the constructor of the parent class, it needs to be explicitly called in the constructor of the subclass, and if the subclass has its own constructor, the constructor of the parent class is not automatically called, but for subclasses without constructors, the constructor of the parent class is automatically inherited. And subclasses will always inherit the constructor of the first parent class in more than one parent class by default. Note: In general, subclasses should inherit all the properties and methods of the parent class, and the constructor method in the subclass can be understood as overriding the constructor method that overrides the parent class.
2. Destructors, like other sounds, are called when Del is called. The call should be displayed
Ii. about overloading and covering
There is no concept of overloading in Python, and multiple functions with the same name as the class cannot be overloaded by the number of arguments or by different implementations of parameter names. Python, a function of the same name, always overrides the previous function by default, which is inconvenient, but adds readability to rigor. I think Python is not overloaded, because Python is a dynamic type of language, since parameters are determined only at run time, that overload is meaningless for python, and Python does not allow missing parameters, which makes overloading meaningless for python. Note: In C #, you can write a virtual method in a parent class, and then overload the method with override in a subclass, and when you call a virtual mode, the overridden method is actually called.
Iii. type of language
There is no doubt that Python is a dynamic, strongly typed language, and if static, the only thing I have seen is static in the list. Value passing is a value (given a value of new memory), and pointer passing is a pointer to memory, which is well understood.
Iv. about polymorphic
In simple terms, polymorphism is the representation or state of a class. Python does not support polymorphism, and the subclass inherits the parent-class re-function, which is actually another object.
Python features small note (i)