classes and types mergedtype testing classes are now typesand types are now classes in factthe two are essentially synonymsthough the metaclasses that now subsume types are still somewhat distinct from normal classes the type(ibuilt-in returns the class an instance is made frominstead of generic instance typeand is normally the same as __class__ moreoverclasses are instances of the type classand type may be subclassed to customize class creation with metaclasses coded with class statements this can impact code that tests types or otherwise relies on the prior type model automatic object root classdefaults all new-style classes (and hence typesinherit from objectwhich comes with small set of default operator overloading methods ( __repr__in xthis class is added automatically above the user-defined root ( topmostclasses in treeand need not be listed as superclass explicitly this can affect code that assumes the absence of method defaults and root classes inheritance search ordermro and diamonds diamond patterns of multiple inheritance have slightly different search order-roughlyat diamonds they are searched across before upand more breadth-first than depth-first this attribute search orderknown as the mrocan be traced with new __mro__ attribute available on new-style classes the new search order largely applies only to diamond class treesthough the new model' implied object root itself forms diamond in all multiple inheritance trees code that relies on the prior order will not work the same inheritance algorithm the algorithm used for inheritance in new-style classes is substantially more complex than the depth-first model of classic classesincorporating special cases for descriptorsmetaclassesand built-ins we won' be able to formalize this until after we've studied metaclasses and descriptors in more depthbut it can impact code that does not anticipate its extra convolutions new advanced toolscode impacts new-style classes have set of new class toolsincluding slotspropertiesdescriptorssuperand the __getattribute__ method most of these have very specific tool-building purposes their use can also impact or break existing codethoughslotsfor examplesometimes prevent creation of an instance namespace dictionary altogetherand generic attribute handlers may require different coding we'll explore the extensions noted in the last of these items in later top-level section of its ownand will defer formal inheritance algorithm coverage until as noted because the other items on this list have the potential to break traditional python codethoughlet' take closer look at each in turn here advanced class topics