Does '!=' equivelent to 'is not'

Duncan Booth duncan.booth at invalid.invalid
Tue Jun 17 10:20:42 CEST 2008


"Leo Jay" <python.leojay at gmail.com> wrote:

> same objects are equal, but equal don't have to be the same object.

same objects are often equal, but not always:

>>> inf = 2e200*2e200
>>> ind = inf/inf
>>> ind==ind
False
>>> ind is ind
True

-- 
Duncan Booth http://kupuguy.blogspot.com



More information about the Python-list mailing list