Result of ``a is b''

Axel Boldt axelboldt at yahoo.com
Mon Mar 15 19:32:25 EST 2004


Hello,

is there a rationale for the following behavior:

  >>> a = (1,2)
  >>> b = (1,2)
  >>> a is b
  False
  >>> a = "12"
  >>> b = "12"
  >>> a is b
  True

Thanks,
  Axel



More information about the Python-list mailing list