hello guys

i just ran into this when comparing negative numbers, they start returning False from -6 down, but only when comparing with 'is'

>>> m = -5
>>> a = -5
>>> m is a
True
>>> m = -6
>>> a = -6
>>> m is a
False
>>> m == a
True

i read that 'is' compares if they are really the same object, but i don't that's it because then why does -5 return True?
of course i could only use == to compare, but still, what am i missing here?
thanks in advance

ariel

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to