Why can't I call methods directly on int objects?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/10955703/accessing-a-python-int-literals-methods">accessing a python int literals methods</a><br>
  <a href="http://stackoverflow.com/questions/11802214/integer-literal-is-an-object-in-python">Integer literal is an object in Python?</a>  </p>
</blockquote>



<p>In python it's possible, and sometimes even common, to call methods or look up attributes directly on literals:</p>

<pre><code>&gt;&gt;&gt; "-".join("abc")
'a-b-c'
&gt;&gt;&gt; {1: 3, 2: 9}.pop(1)
3
&gt;&gt;&gt; 3j.imag
3.0
&gt;&gt;&gt; 8.0.__add__(8)
16.0
</code></pre>

<p>But for some reason this does not work on integer objects:</p>

<pre><code>&gt;&gt;&gt; 3.__add__(42)
  File "&lt;stdin&gt;", line 1
    3.__add__(42)
            ^
SyntaxError: invalid syntax
</code></pre>

<p>Why not?</p>
