[Python-Dev] PyObject_RichCompareBool identity shortcut

Stephen J. Turnbull stephen at xemacs.org
Thu Apr 28 04:42:30 CEST 2011


Mark Dickinson writes:

 > Declaring that 'nan == nan' should be True seems attractive in
 > theory,

No, it's intuitively attractive, but that's because humans like nice
continuous behavior.  In *theory*, it's true that some singularities
are removable, and the NaN that occurs when evaluating at that point
is actually definable in a broader context, but the point of NaN is
that some singularities are *not* removable.  This is somewhat
Pythonic: "In the presence of ambiguity, refuse to guess."



More information about the Python-Dev mailing list