MRO is not a nested hierarchy. This is a flat list that obeys a set of constraints, namely that each class must precede its base classes, and these base classes must exist in the same order relative to each other, as they are mentioned in the subclass declaration.
Fourth.__mro__ printed Fourth.__mro__ , we see that MRO in your examples:
(<class '__main__.Fourth'>, <class '__main__.Second'>, <class '__main__.Third'>, <class '__main__.First'>, <type 'object'>)
Each super call that is called will call the next method in the MRO. You can think of the number of super calls as the zero indexed "depth" in the MRO that you will exit.
Since there are two super calls in the first fragment, Second.__init__ and Third.__init__ (in addition, of course, to the method of the immediate init class). Similarly, in the second snippet, you have one call to super , which means that only Second.__init__ will be called.
source share