title: Why (0-6) is -6 = False?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/306313/python-is-operator-behaves-unexpectedly-with-integers">Python &ldquo;is&rdquo; operator behaves unexpectedly with integers</a>  </p>
  </blockquote>
  
  
  
  <p>Today I tried to debug my project and after a few hours of analysing I'd got this:</p>
  
  <pre><code>&gt;&gt;&gt; (0-6) is -6
  False
  </code></pre>
  
  <p>but,</p>
  
  <pre><code>&gt;&gt;&gt; (0-5) is -5
  True
  </code></pre>
  
  <p>Could you explain to me, why?
  Maybe this is some kind of bug or very strange behavior.</p>
  
  <pre><code>&gt; Python 2.7.3 (default, Apr 24 2012, 00:00:54) [GCC 4.7.0 20120414 (prerelease)] on linux2
  &gt;&gt;&gt; type(0-6) 
  &lt;type 'int'&gt;
  &gt;&gt;&gt; type(-6) 
  &lt;type 'int'&gt;
  &gt;&gt;&gt; type((0-6) is -6)
  &lt;type 'bool'&gt;
  &gt;&gt;&gt; 
  </code></pre>