comparing nan "number"
Michael Hudson
mwh at python.net
Tue Dec 2 07:52:38 EST 2003
jjl at pobox.com (John J. Lee) writes:
> 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__.
Huh? Yes it does (*after* __hash__, of course, but...).
Cheers,
mwh
--
how am I expected to quit smoking if I have to deal with NT
every day -- Ben Raia
More information about the Python-list
mailing list