[issue41049] PyObject_RichCompareBool(nan, nan, eq) can be True

2020-06-20 Thread tamuhey
New submission from tamuhey : Applying PyObject_RichCompareBool to two `nan`s can be true if the two nans are same object, i.e. ``` a = float("nan") PyObject_RichCompareBool(a, a, Py_EQ) // True ``` I read the document (https://docs.python.org/3/c-api/object.html

[issue41049] Document pointer comparison in PyObject_RichCompareBool()

2020-06-20 Thread tamuhey
tamuhey added the comment: > Hmm, I missed it. There is already a note in the link you provided I've read the comment before posting this issue. But I think there should be the following info: 1. example (float("nan")) 2. the result is inconsistent with Py