[issue1981] operator "is"

Alexander Shigin report at bugs.python.org
Thu Jan 31 17:46:30 CET 2008


Alexander Shigin added the comment:

I think it's good idea to make a note in Comparisons section or make 
some reference to data model section.

"""
The operators is and is not test for object identity: x is y is true if 
and only if x and y are the same object. x is not y yields the inverse 
truth value.
"""

But,
>>> id(a.__abs__) == id(a.__abs__)
True

And only example below shows me error in my objection.
>>> id(w)
6636344
>>> p = id(w)
>>> del w
>>> e = 1
>>> id(e)
6636344

I'm sorry for spam. I've missed Issue1410739 when search for any open 
bug.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1981>
__________________________________


More information about the Python-bugs-list mailing list