You are viewing a single comment's thread from:

RE: Python gotcha - "is" operator on integers

in #python • 9 years ago (edited)

== tests if they are equal, and is is testing if they are the same object.
They are the same value so == succeeds, but they are not the same reference so is fails.