>>> a = 1
>>> b = 2
>>> c = 3
>>> a+b is not c
False
Close python, start new session to be sure variables aren't being re-used or anything
>>> a = 293
>>> b = 2
>>> c = 296
>>> a+b is not c-1
True
Why are these different?
- 4 is not 4 - False (correct)
- 295 is not 295 - True (incorrect)
EDIT: sorry I don't think I was clear in my question. i'm not asking if is not should be used for value comparison, or if it's equivalent to !=, I'm asking why it produces inconsistent results that vary based on the integer values being evaluated.