On Mon, May 30, 2011 at 3:44 AM, MRAB <pyt...@mrabarnett.plus.com> wrote:
> Would there be any advantage to making NaN a singleton? I'm thinking
> that it could make checking for it cheaper in the implementation of
> sets and dicts. Or making NaN unhashable?

Doesn't matter. It still wouldn't be equal to itself, even though it
'is' itself, which will greatly confuse anything that optimizes that
away. Numbers are well-behaved; NaN is not a number; NaN is not
well-behaved. It makes sense... in a way.

Chris Angelico
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to