On Fri, Mar 13, 2020 at 8:36 PM Stephen Tucker <stephen_tuc...@sil.org> wrote: > > *Chris:* Thank you for your confirmation. > > *All: *For the record, I meant that the tuples are all the same. The > tuples I have in mind contain strings, so the issue regarding the > "equality" (or otherwise) of 0 and 0.0 does not arise in my case. > > Stephen.
If you create the tuples independently, they can be equal but not identical. Example: >>> def cons(x, y): return x, y ... >>> spam = cons("foo", "bar") >>> spon = cons("foo", "bar") >>> spam == spon True >>> spam is spon False For the most part, you won't care about identity, only equality. Everything you said was correct for equality. ChrisA -- https://mail.python.org/mailman/listinfo/python-list