search procedure in factboth call forms are valid in python besides the normal inheritance of method attribute namesthe special first argument is the only real magic behind method calls in class' methodthe first argument is usually called self by convention (technicallyonly its position is significantnot its namethis argument provides methods with hook back to the instance that is the subject of the call--because classes generate many instance objectsthey need to use this argument to manage data that varies per instance +programmers may recognize python' self argument as being similar to ++' this pointer in pythonthoughself is always explicit in your codemethods must always go through self to fetch or change attributes of the instance being processed by the current method call this explicit nature of self is by design--the presence of this name makes it obvious that you are using instance attribute names in your scriptnot names in the local or global scope method example to clarify these conceptslet' turn to an example suppose we define the following classclass nextclassdef printer(selftext)self message text print(self messagedefine class define method change instance access instance the name printer references function objectbecause it' assigned in the class statement' scopeit becomes class object attribute and is inherited by every instance made from the class normallybecause methods like printer are designed to process instanceswe call them through instancesx nextclass( printer('instance call'instance call message 'instance callmake instance call its method instance changed when we call the method by qualifying an instance like thisprinter is first located by inheritanceand then its self argument is automatically assigned the instance object ( )the text argument gets the string passed at the call ('instance call'notice that because python automatically passes the first argument to self for uswe only actually have to pass in one argument inside printerthe name self is used to access or set per-instance data because it refers back to the instance currently being processed as we've seenthoughmethods may be called in one of two ways--through an instanceor through the class itself for examplewe can also call printer by going through the class nameprovided we pass an instance to the self argument explicitlymethods