Why do i get this error "TypeError: 'int' object is not callable"?
<pre><code>def diameter(Points):
    '''Given a list of 2d points, returns the pair that's farthest apart.'''
    diam,pair = max([((p[0]-q[0])**2 + (p[1]-q[1])**2, (p,q))
                     for p,q in rotatingCalipers(Points)])
    return pair


n=int(input())

a=[]

max=0

for i in xrange(n):
    m,n=map(int,raw_input().split())
    a.append((m,n))
    diameter(a)
</code></pre>

<p>Traceback</p>

<pre><code>Traceback (most recent call last):
  File "geocheat1.py", line 56, in &lt;module&gt;
    diameter(a)
  File "geocheat1.py", line 43, in diameter
    for p,q in rotatingCalipers(Points)])
TypeError: 'int' object is not callable
</code></pre>

<p>From the Traceback it's clear than you are trying to call <code>int</code> object, So <code>rotatingCalipers</code> may be declared as integer in your code. </p>

<p>See this example you will understand the error,</p>

<pre><code>In [1]: a = (1,2,3)
In [2]: list(a)
Out[1]: [1, 2, 3]
In [3]: list = 5
In [4]: list(a)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
&lt;ipython-input-20-61edcfee5862&gt; in &lt;module&gt;()
----&gt; 1 list(a)

TypeError: 'int' object is not callable
</code></pre>

python python-2.7