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

Joe Pfeiffer pfeiffer at cs.nmsu.edu
Thu Feb 14 12:54:38 EST 2019


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.



More information about the Python-list mailing list