[Python-Dev] Rich comparisons
Neil Schemenauer
nas-python at python.ca
Fri Mar 19 11:52:48 EST 2004
On Fri, Mar 19, 2004 at 12:01:31PM +0000, Michael Hudson wrote:
> >>> float('nan')
> nan
> >>> _ == _
> False
Would it help if each NaN instance was a separate object? The above
code would still return True but code like:
compute_something() == compute_something_else('nan')
would always return False if they both returned NaN as a result of
math operations.
Neil
More information about the Python-Dev
mailing list