On Thu, 4 Oct 2012 17:08:40 +0200 Victor Stinner email@example.com wrote:
PyObject_RichCompareBool() implements this optimization which leads to incorrect results:
nan = float("nan") mytuple = (nan,) assert mytuple != mytuple # fails
I think that the optimization should be implemented for Unicode strings, but disabled in PyObject_RichCompareBool().
I think we should wait for someone to complain before disabling it. It's a useful optimization.