Skip to content
3 changes: 2 additions & 1 deletion Objects/listobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2771,11 +2771,12 @@ unsafe_object_compare(PyObject *v, PyObject *w, MergeState *ms)

if (PyBool_Check(res_obj)) {
res = (res_obj == Py_True);
assert(_Py_IsImmortal(res_obj));
}
else {
res = PyObject_IsTrue(res_obj);
Py_DECREF(res_obj);
}
Py_DECREF(res_obj);

/* Note that we can't assert
* res == PyObject_RichCompareBool(v, w, Py_LT);
Expand Down
Loading