although they are technically two separate object types in the python modelthe classes and instances we put in these trees are almost identical--each type' main purpose is to serve as another kind of namespace-- package of variablesand place where we can attach attributes if classes and instances therefore sound like modulesthey shouldhoweverthe objects in class trees also have automatically searched links to other namespace objectsand classes correspond to statementsnot entire files the primary difference between classes and instances is that classes are kind of factory for generating instances for examplein realistic applicationwe might have an employee class that defines what it means to be an employeefrom that classwe generate actual employee instances this is another difference between classes and modules-we only ever have one instance of given module in memory (that' why we have to reload module to get its new code)but with classeswe can make as many instances as we need operationallyclasses will usually have functions attached to them ( computesa lary)and the instances will have more basic data items used by the class' functions ( hoursworkedin factthe object-oriented model is not that different from the classic data-processing model of programs plus records--in oopinstances are like records with "data,and classes are the "programsfor processing those records in oopthoughwe also have the notion of an inheritance hierarchywhich supports software customization better than earlier models method calls in the prior sectionwe saw how the attribute reference in our example class tree was translated to by the inheritance search procedure in python perhaps just as important to understand as the inheritance of attributesthoughis what happens when we try to call methods--functions attached to classes as attributes if this reference is function callwhat it really means is "call the function to process that ispython will automatically map the call (into the call ( )passing in the instance as the first argument to the inherited function in factwhenever we call function attached to class in this fashionan instance of the class is always implied this implied subject or context is part of the reason we refer to this as an object-oriented model--there is always subject object when an operation is run in more realistic examplewe might invoke method called giveraise attached as an attribute to an employee classsuch call has no meaning unless qualified with the employee to whom the raise should be given as we'll see laterpython passes in the implied instance to special first argument in the methodcalled self by convention methods go through this argument to process the subject of the call as we'll also learnmethods can be called through either an instance--bob giveraise()--or class--employee giveraise(bob)--and both forms oopthe big picture