Result of ``a is b''

Terry Reedy tjreedy at udel.edu
Wed Mar 17 11:42:15 EST 2004


"Axel Boldt" <axelboldt at yahoo.com> wrote in message
news:40200384.0403170530.57b6bba4 at posting.google.com...
> "is" on immutables would be useful. Why would anybody ever want to
> know whether two strings or tupels are internally stored at the same
> location, other than to deduce details of the Python implementation?

Deducing details of the implementation *is*, for people with a certain
curiosity, a legitimate usage, in spite of your distain for such.
Explaining the bahavior of

a=[1]
b=a
a[0]=2
print b

is another use for 'is'.

Terry J. Reedy







More information about the Python-list mailing list