$ python Python 3.6.1 (default, Apr 19 2017, 14:30:24) >>> from math import nan >>> d = dict() >>> d[nan] = "a" >>> d[nan] = "b" >>> d {nan: 'b'} >>> nan == nan False
Dict
nan