Earlier quoted context omitted.
> I can write a program that treats all Python objects identically, by simply doing nothing. That doesn't make all Python objects actually identical. Yes, you can. Thank you for proving my point that Python programs don't have to use your definition of identity. But that's a silly example. Here's an example that's not silly: in an earlier discussion you said dictionary keys have to be values--which would imply that d…
> But two distinct Python tuples (1, 2, 3), which are not identical by your definition, do behave as identical keys in a Python dictionary. The numbers 2 and 4 behave identically when passed to a function that tests whether its argument is an even number. Are 2 and 4 identical now? > To you, it appears to mean that Python is violating Western logic. This is the third time I'm saying I never said Python is violating W…
They are with respect to the even/odd property. So if that's the property I'm interested in, they're identical. They might not be if I'm interested in some other property.
In other words, as dragonwriter has already pointed out, there is more than one concept of identity.