comparing nan "number"

John J. Lee jjl at pobox.com
Tue Dec 2 07:34:14 EST 2003


Alexander Schmolck <a.schmolck at gmx.net> writes:
[...]
> possibly be `False` and {x:"some value}[x] might well raise an exception if
> `x` is a nan (or indeed one of infinitely many Numeric arrays with
[...]

Don't you mean SomeMapping((x, "some value"))[x]?  A dict lookup
doesn't use __eq__.


John




More information about the Python-list mailing list