python - Should we "super()" in base class? -


in python 3 use super inherited classes follows:

class orange(fruit):     def __init__(self):         super().__init__() 

in code snippet above orange class inherits fruit class. take @ parent class

class fruit():     def __init__(self):         pass       # call super().__init__() here? 

do need call super parent/base class mro work effectively?

no, in python there's no point in calling __init__ on super base classes , mro still initialised


Comments