from bottom to top and left to right in other wordsattribute fetches are simply tree searches the term inheritance is applied because objects lower in tree inherit attributes attached to objects higher in that tree as the search proceeds from the bottom upin sensethe objects linked into tree are the union of all the attributes defined in all their tree parentsall the way up the tree in pythonthis is all very literalwe really do build up trees of linked objects with codeand python really does climb this tree at runtime searching for attributes every time we use the object attribute expression to make this more concretefigure - sketches an example of one of these trees figure - class treewith two instances at the bottom ( and ) class above them ( )and two superclasses at the top ( and all of these objects are namespaces (packages of variables)and the inheritance search is simply search of the tree from bottom to top looking for the lowest occurrence of an attribute name code implies the shape of such trees in this figurethere is tree of five objects labeled with variablesall of which have attached attributesready to be searched more specificallythis tree links together three class objects (the ovals and and two instance objects (the rectangles and into an inheritance search tree notice that in the python object modelclasses and the instances you generate from them are two distinct object typesclasses serve as instance factories their attributes provide behavior--data and functions --that is inherited by all the instances generated from them ( function to compute an employee' salary from pay and hoursinstances represent the concrete items in program' domain their attributes record data that varies per specific object ( an employee' social security numberin terms of search treesan instance inherits attributes from its classand class inherits attributes from all classes above it in the tree oopthe big picture