details of the mro are bit too arcane and academic for this text as rulethis book avoids formal algorithms and prefers to teach informally by example on the other handsome readers may still have an interest in the formal theory behind new-style mro if this set includes youit' described in full detail onlinesearch python' manuals and the web for current mro links in shortthoughthe mro essentially works like this list all the classes that an instance inherits from using the classic class' dflr lookup ruleand include class multiple times if it' visited more than once scan the resulting list for duplicate classesremoving all but the last occurrence of duplicates in the list the resulting mro list for given class includes the classits superclassesand all higher superclasses up to the object root class at the top of the tree it' ordered such that each class appears before its parentsand multiple parents retain the order in which they appear in the __bases__ superclass tuple cruciallythoughbecause common parents in diamonds appear only at the position of their last visitationlower classes are searched first when the mro list is later used by attribute inheritance moreovereach class is included and thus visited just onceno matter how many classes lead to it we'll see applications of this algorithm later in this including that in super- built-in that elevates the mro to required reading if you wish to fully understand how methods are dispatched by this callshould you choose to use it as we'll seedespite its namethis call invokes the next class on the mrowhich might not be superclass at all tracing the mro if you just want to see how python' new-style inheritance orders superclasses in generalthoughnew-style classes (and hence all classes in xhave class __mro__ attributewhich is tuple giving the linear search order python uses to look up attributes in superclasses reallythis attribute is the inheritance order in new-style classesand is often as much mro detail as many python users need here are some illustrative examplesrun in xfor diamond inheritance patterns onlythe search is the new order we've been studying--across before upper the mro for new-style classes always used in xand available as an option in xclass apass class ( )pass diamondsorder differs for newstyle class ( )pass breadth-first across lower levels class (bc)pass __mro__ ( advanced class topics