[Python-Dev] PyObject_RichCompareBool identity shortcut (original) (raw)
Stephen J. Turnbull stephen at xemacs.org
Thu Apr 28 04:31:20 CEST 2011
- Previous message: [Python-Dev] PyObject_RichCompareBool identity shortcut
- Next message: [Python-Dev] PyObject_RichCompareBool identity shortcut
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Glenn Linderman writes:
I would not, however expect the original case that was described:
nan = float('nan') nan == nan False [nan] == [nan] True # also True in tuples, dicts, etc.
Are you saying you would expect that
nan = float('nan') a = [1, ..., 499, nan, 501, ..., 999] # meta-ellipsis, not Ellipsis a == a False
??
I wouldn't even expect
a = [1, ..., 499, float('nan'), 501, ..., 999] b = [1, ..., 499, float('nan'), 501, ..., 999] a == b False
but I guess I have to live with that. While I wouldn't apply it to other people, I have to admit Raymond's aphorism applies to me (the surprising thing is not the behavior of NaNs, but that I'm surprised by anything that happens in the presence of NaNs!)
- Previous message: [Python-Dev] PyObject_RichCompareBool identity shortcut
- Next message: [Python-Dev] PyObject_RichCompareBool identity shortcut
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]