title: Is it possible to override a class' __call__ method?
body: <p>I need to change the behavior of the <code>__call__</code> method of a given object. The naive approach would be something like:</p>
  
  <pre><code>class A(object):
      def __call__(self):
          return 1
  
  def new_call():
      return 42
  
  
  a = A()
  a.__call__ = new_call
  </code></pre>
  
  <p>Why is it not the output of <code>a()</code> 42? Is there a workaround I can exploit to achieve the same effect? (without using the class)</p>
  
  <hr>
  
  <p>============================    EDIT =================================</p>
  
  <p>For the records, the short answer is no. Python calls the "special methods" like <code>__call_</code> directly on the class and not on the instance, therefore if you need to change the method, you need to change it on the class itself.</p>