title: Python: Different results when using PyCharm and IDLE/python
body: <p>I was just reading about the 'unexpected result of is operator' which happens because Python cache numbers between -5 and 256.</p>
  
  <p>This was discussed here:
  <a href="https://stackoverflow.com/questions/306313/is-operator-behaves-unexpectedly-with-integers">&quot;is&quot; operator behaves unexpectedly with integers</a></p>
  
  <p>and here:
  <a href="https://stackoverflow.com/questions/36026537/is-and-id-in-python-3-5">&quot;is&quot; and &quot;id&quot; in Python 3.5</a></p>
  
  <p>When I run one of the examples given there, I get different results between Python Idle and Python IDE (I'm using Jetbrains Pycharm professional edition - 5.0.4).</p>
  
  <p>When using Python IDLE this is the result:</p>
  
  <pre><code>a = 1000
  b = 1000
  print (a is b) # prints False
  </code></pre>
  
  <p>when using Pycharm 5.0.4 this is the result:</p>
  
  <pre><code>a = 1000
  b = 1000
  print (a is b) # prints True
  </code></pre>
  
  <p>how could this be?
  I've rechecked, and my project's Python-Interpreter is exactly the same in both cases (both are Python 3.5.1).
  Not sure if this is something I've done wrong, and I was hoping if someone could explain this.</p>
  
  <p><strong>Edit:</strong> </p>
  
  <p>I know 'a' is 'b' == true iff id(a) == id(b), and that you can check it like some of you mentioned in the comments. Perhaps I should have been more clear, what I don't understand is how could it be that an IDE has different behavior? I thought (and please, correct me, as it seems I'm wrong) that an IDE is just a user-friendly environment that uses external compilers / interpreters, and this is why these are independent of those IDE's (for instance, pycharm supports not only Python, and I could run Eclipse with C compiler, or Java etc. (all of which are not parts of the IDE).</p>
  
  <p>Thanks,
  Alon.</p>