Result of ``a is b''

Axel Boldt axelboldt at yahoo.com
Tue Mar 16 01:32:25 CET 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