Problem with making object callable in python
<p>I wrote code like this</p>

<pre><code>&gt;&gt;&gt; class a(object):
    def __init__(self):
     self.__call__ = lambda x:x

&gt;&gt;&gt; b = a()
</code></pre>

<p>I expected that object of class a should be callable object but eventually it is not.</p>

<pre><code>&gt;&gt;&gt; b()

Traceback (most recent call last):
  File "&lt;pyshell#5&gt;", line 1, in &lt;module&gt;
    b()
TypeError: 'a' object is not callable
&gt;&gt;&gt; callable(b)
False

&gt;&gt;&gt; hasattr(b,'__call__')
True
&gt;&gt;&gt;
</code></pre>

<p>I can't understand why. 
Please help me.</p>
