method objects usuallya method is called right after it is boundx (in the myclass examplethis will return the string 'hello worldhoweverit is not necessary to call method right awayx is method objectand can be stored away and called at later time for examplexf while trueprint(xf()will continue to print hello world until the end of time what exactly happens when method is calledyou may have noticed that (was called without an argument aboveeven though the function definition for (specified an argument what happened to the argumentsurely python raises an exception when function that requires an argument is called without any -even if the argument isn' actually used actuallyyou may have guessed the answerthe special thing about methods is that the instance object is passed as the first argument of the function in our examplethe call (is exactly equivalent to myclass (xin generalcalling method with list of arguments is equivalent to calling the corresponding function with an argument list that is created by inserting the method' instance object before the first argument if you still don' understand how methods worka look at the implementation can perhaps clarify matters when non-data attribute of an instance is referencedthe instance' class is searched if the name denotes valid class attribute that is function objecta method object is created by packing (pointers tothe instance object and the function object just found together in an abstract objectthis is the method object when the method object is called with an argument lista new argument list is constructed from the instance object and the argument listand the function object is called with this new argument list class and instance variables generally speakinginstance variables are for data unique to each instance and class variables are for attributes and methods shared by all instances of the classclass dogkind 'canineclass variable shared by all instances def __init__(selfname)self name name instance variable unique to each instance dog('fido' dog('buddy' kind 'caninee kind 'canined name 'fidoe name 'buddy shared by all dogs shared by all dogs unique to unique to classes