
April 29, 2011
3:57 p.m.
On Fri, Apr 29, 2011 at 3:30 AM, Stephen J. Turnbull <stephen@xemacs.org> wrote:
Rob Cliffe writes:
> True. But why be forced to walk on eggshells when writing a perfectly > ordinary bit of code that "ought" to work as is?
What makes you think *anything* "ought" to "work" in the presence of NaNs?
There are different shades of "not working". In most cases, raising an exception is preferable to silently producing garbage or entering an infinite loop. NaNs are unordered and NaN < 0 makes as much sense as None < 0 or "abc" < 0. The later operations raise an exception in py3k.