osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why float('Nan') == float('Nan') is False


Chris Angelico <rosuav at gmail.com> writes:
>
> Or even better, use None instead of nan. There's nothing in Python
> says you have to (ab)use a floating-point value as a signal. Or use
> "while True" and add a break if the exception isn't thrown.

Good point.