[Python-Dev] == on object tests identity in 3.x (original) (raw)
Stephen J. Turnbull stephen at xemacs.org
Tue Jul 8 05:34:33 CEST 2014
- Previous message: [Python-Dev] == on object tests identity in 3.x
- Next message: [Python-Dev] == on object tests identity in 3.x
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ethan Furman writes:
And what would be this 'sensible definition' [of value equality]?
I think that's the wrong question. I suppose Andreas's point is that when the programmer doesn't provide a definition, there is no such thing as a "sensible definition" to default to. I disagree, but given that as the point of discussion, asking what the definition is, is moot.
- The 'is' operator is specialized, and should only rarely be needed.
Nitpick: Except that it's the preferred way to express identity with singletons, AFAIK. ("if x is None: ...", not "if x == None: ...".)
- Previous message: [Python-Dev] == on object tests identity in 3.x
- Next message: [Python-Dev] == on object tests identity in 3.x
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]