comparing nan "number"
John J. Lee
jjl at pobox.com
Tue Dec 2 07:22:56 EST 2003
Michael Hudson <mwh at python.net> writes:
> jjl at pobox.com (John J. Lee) writes:
[...]
> > I suppose:
> >
> > NAN = any_calculation_that_returns_nan()
> >
> > if some_other_calculation() is NAN:
> > ...
>
> I wouldn't expect that to work. Unfortunately, I don't think there is
> a reliable way.
[...]
Yeah, I forgot nan is a floating point value, not a special Python
thingy like None, duh (thanks Alexander).
John
More information about the Python-list
mailing list