title: How to get Instance of Class when using Class Decorator
body: <p>so I'm here to find out where the <strong>C class's Instance</strong> has gone, namely <strong>spam</strong>. we all know, of course, that if we call a method from a class through Instance, Instance i.e. (self) is automatically passed in. so I want to know where self (Instance of C class) gone when calling methodDec. So i can use the <strong>spam</strong> Instance</p>
  
  <pre><code>class decorator:
      def __init__(self, func):   
          self.func = func
      def __call__(self, *args):   
           self.func(self,*args)      
  
  class C:
      def method(*a): 
          print(*a)       
      methodDec = decorator(method)
  
  spam=C()
  spam.methodDec('x','y','z')
  spam.method('x','y','z')
  </code></pre>
  
  <p>the output is</p>
  
  <pre><code>&gt;&gt;&gt; &lt;__main__.decorator object at 0x0120A148&gt; x y z
      &lt;__main__.C object at 0x0120A208&gt; x y z
  </code></pre>