TypeError: unsupported operand type(s) for +: 'function' and 'int'
<p>Why this function call is giving me the above error?</p>

<pre><code>count=0
def returncall():
  for i,j in enumerate(range(count,count+3),0):
    print i,j
  return j
count=returncall
print count()
</code></pre>

<p>The problem is here:</p>

<pre><code>for i,j in enumerate(range(count,count+3),0):
</code></pre>

<p><code>count</code> is another name for <code>returncall</code> because you have done <code>count = returncall</code>. <code>returncall</code> is a function; in fact, it's the very function that statement is in. You can't add an integer to a function (<code>count+3</code>) because that is meaningless.</p>

<p>I don't really understand what you're attempting to do here, so can't really offer further advice. But that's what the error message means.</p>

python python-2.7