CLN: using PyObject_RichCompareBool where possible