object doit('hello world'reallythougha bound method object is generated along the wayjust before the method call' parentheses in factwe can fetch bound method without actually calling it an object name expression evaluates to an object as all expressions do in the followingit returns bound method object that packages the instance (object with the method function (spam doitwe can assign this bound method pair to another name and then call it as though it were simple functionobject spam( object doit ('hello world'bound method objectinstance+function same effect as object doit('on the other handif we qualify the class to get to doitwe get back an unbound method objectwhich is simply reference to the function object to call this type of methodwe must pass in an instance as the leftmost argument--there isn' one in the expression otherwiseand the method expects itobject spam( spam doit (object 'howdy'unbound method object ( function in xsee aheadpass in instance (if the method expects one in xby extensionthe same rules apply within class' method if we reference self attributes that refer to functions in the class self method expression is bound method object because self is an instance objectclass eggsdef (selfn)print(ndef (self) self ( another bound method object looks like simple function eggs( (prints most of the timeyou call methods immediately after fetching them with attribute qualificationso you don' always notice the method objects generated along the way but if you start writing code that calls objects genericallyyou need to be careful to treat unbound methods specially--they normally require an explicit instance object to be passed in for an optional exception to this rulesee the discussion of static and class methods in the next and the brief mention of one in the next section like bound methodsstatic methods can masquerade as basic functions because they do not expect instances when called formally speakingpython supports three kinds of class-level methods-instancestaticand class--and allows simple functions in classestoo ' metaclass methods are distinct toobut they are essentially class methods with less scope methods are objectsbound or unbound