class (bc)pass ( meth( meth use default search order will vary per class type defaults to classic order in class (bc)meth meth ( meth( meth <=pick ' methodnew-style (and xclass (bc)meth meth ( meth( meth <=pick ' methodclassic herewe select methods by explicitly assigning to names lower in the tree we might also simply call the desired class explicitlyin practicethis pattern might be more commonespecially for things like constructorsclass (bc)def meth(self) meth(selfredefine lower <=pick ' method by calling such selections by assignment or call at mix-in points can effectively insulate your code from this difference in class flavors this applies only to the attributes you handle this wayof coursebut explicitly resolving the conflicts ensures that your code won' vary per python versionat least in terms of attribute conflict selection in other wordsthis can serve as portability technique for classes that may need to be run under both the new-style and classic class models explicit is better than implicit--for method resolution tooeven without the classic/new-style class divergencethe explicit method resolution technique shown here may come in handy in multiple inheritance scenarios in general for instanceif you want part of superclass on the left and part of superclass on the rightyou might need to tell python which same-named attributes to choose by using explicit assignments or calls in subclasses we'll revisit this notion in "gotchaat the end of this also note that diamond inheritance patterns might be more problematic in some cases than 've implied here ( what if and both have required constructors that call to the constructor in ?since such contexts are rare in real-world pythonwe'll defer this topic until we explore the super built-in function near the end of this besides providing generic access to superclasses in single inheritance treessuper supports cooperative mode for resolving conflicts in multiple inheritance trees by ordering method calls per the mro--assuming this order makes sense in this context too advanced class topics