python why call super 28class 29 init 28 29

Solutions on MaxInterview for python why call super 28class 29 init 28 29 by the best coders in the world

showing results for - "python why call super 28class 29 init 28 29"
Jessica
12 Jan 2020
1super() lets you avoid referring to the base class explicitly, 
2which can be nice. 
3But the main advantage comes with multiple inheritance.
4Note that the syntax changed in Python 3.0: you can just say super().__init__()
5instead of super(ChildB, self).__init__() which IMO is quite a bit nicer.