title: How to decorate all functions of a class without typing it over and over for each method?
body: <p>Lets say my class has many methods, and I want to apply my decorator on each one of them, later when I add new methods, I want the same decorator to be applied, but I dont want to write @mydecorator above the method declaration all the time?</p>
  
  <p>If I look into <code>__call__</code> is that the right way to go?</p>
  
  <p><strong>IMPORTANT:</strong> the example below appears to be solving a different problem than the original question asked about.</p>
  
  <p><strong>EDIT:</strong> Id like to show this way, which is a similar solution to my problem for anyobody finding this question later, using a mixin as mentioned in the comments. </p>
  
  <pre><code>class WrapinMixin(object):
      def __call__(self, hey, you, *args):
          print 'entering', hey, you, repr(args)
          try:
              ret = getattr(self, hey)(you, *args)
              return ret
          except:
              ret = str(e)
              raise
          finally:
              print 'leaving', hey, repr(ret)
  </code></pre>
  
  <p>Then you can in another </p>
  
  <pre><code>class Wrapmymethodsaround(WrapinMixin): 
      def __call__:
           return super(Wrapmymethodsaround, self).__call__(hey, you, *args)
  </code></pre>