title: Python decorators in classes
body: <p>Can one write something like:</p>
  
  <pre><code>class Test(object):
      def _decorator(self, foo):
          foo()
  
      @self._decorator
      def bar(self):
          pass
  </code></pre>
  
  <p>This fails: self in @self is unknown</p>
  
  <p>I also tried:</p>
  
  <pre><code>@Test._decorator(self)
  </code></pre>
  
  <p>which also fails: Test unknown</p>
  
  <p>I would like to temporarily change some instance variables 
  in the decorator and then run the decorated method, before
  changing them back.</p>