- super (). __init__ relative to the class name. __init__, the usage is basically no difference on single inheritance
- However, there is a difference in multiple inheritance , the super method guarantees that the methods of each parent class will only be executed once, and the method using the class name will cause the method to be executed multiple times
- multiple inheritance , using the Super method, the parent class of the arguments, should be due to the super algorithm in Python cause, must pass all parameters, otherwise it will error
- single inheritance , using Super method, you can not pass all, can only pass the parameters required by the parent class method, otherwise it will error
- multiple inheritance , relative to the use of the class name. __init__ method, to write each parent class all over, and use the Super method, just write a sentence to execute all the parent class method, this is why more inheritance requires all the argument of a reason
The difference between super (). __init__ and class name in Python. __init__