is operator

Metal Zong metalzong at 163.com
Sun Mar 9 10:34:03 EDT 2008


The operator is and is not test for object identity: x is y is true if and
only if x and y are the same objects.

 

>>> x = 1

>>> y = 1

>>> x is y

True

 

Is this right? Why? Thanks.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080309/56ad5848/attachment.html>


More information about the Python-list mailing list