Python: Different results when using PyCharm and IDLE/python
I was just reading about the 'unexpected result of is operator' which happens because Python cache numbers between -5 and 256. This was discussed here: "is" operator behaves unexpectedly with integers and here: "is" and "id" in Python 3.5 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). When using Python IDLE this is the result: a = 1000 b = 1000 print (a is b) # prints False when using Pycharm 5.0.4 this is the result: a = 1000 b = 1000 print (a is b) # prints True how could this