the interpreter will invoke the __lt__ operator associated with the type of the one defined in class mitperson this will lead to the exception attributeerror'personobject has no attribute 'idnumbecause the object to which is bound does not have an attribute idnum multiple levels of inheritance figure adds another couple of levels of inheritance to the class hierarchy class student(mitperson)pass class ug(student)def __init__(selfnameclassyear)mitperson __init__(selfnameself year classyear def getclass(self)return self year class grad(student)pass figure two kinds of students adding ug seems logicalbecause we want to associate year of graduation (or perhaps anticipated graduationwith each undergraduate but what is going on with the classes student and gradby using the python reserved word pass as the bodywe indicate that the class has no attributes other than those inherited from its superclass why would one ever want to create class with no new attributesby introducing the class gradwe gain the ability to create two different kinds of students and use their types to distinguish one kind of object from another for examplethe code grad('buzz aldrin' ug('billy beaver' print 'is graduate student is'type( =grad print 'is an undergraduate student is'type( =ug will print buzz aldrin is graduate student is true buzz aldrin is an undergraduate student is false the utility of the intermediate type student is bit subtler consider going back to class mitperson and adding the method def isstudent(self)return isinstance(selfstudentthe function isinstance is built into python the first argument of isinstance can be any objectbut the second argument must be an object of type type the function returns true if and only if the first argument is an instance of the second argument for example the value of isinstance([ , ]listis true