I am curious to know why
float('nan') == float('nan')
returns False.
I noticed this while debugging and realizing that if I had foo = float('nan')
then to my surprise foo in [bar, float('nan')]
always returned False.
I am curious to know why
float('nan') == float('nan')
returns False.
I noticed this while debugging and realizing that if I had foo = float('nan')
then to my surprise foo in [bar, float('nan')]
always returned False.