Am 29.05.2011 19:44, schrieb MRAB: > 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?
It can't be a singleton, because IEEE 754 specifies millions of millions of different NaN values. There are positive and negative NaNs, quiet NaNs and signaling NaNs. 50 of 52 mantissa bits can vary freely, one bit makes the difference between signaling and quiet NaNs and at least one bit must be non-zero. Christian -- http://mail.python.org/mailman/listinfo/python-list