Here's a #PythonOddity for you. You can use `float('nan')` as a key in a dictionary. But if you then try to access `my_dict[float('nan')]` you'll get a `KeyError`. If you assign `float('nan')` to a variable and then use that variable to set/access the dictionary that will work.
This happens because `float('nan') != float('nan')`. Even though the hashes are the same, the values are unequal and the dictionary lookup includes an equality check.