Zachary F. answered 07/24/21
Basic Math, General Computer Skill, and Python3 Tutor
In ChildA, the parent class's __init__ method is explicitly called in the constructor with an argument of self. In ChildB, the super call is syntax sugar for calling the __init__ method of ChildB's parent class with the argument of self. The difference is twofold. First, if the parent class changes, you don't need to change anything the __init__ method of ChildB, but you would need to change the Base.__init__(self) call in ChildA. Secondly, the super() function, uses what is called Method Resolution Order, or mro, in order to properly resolve the method order conflicts that can occur when the class hierarchy is more complex than your simple example. In fact, the super call in your example could be shorted to super().__init__().