summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/_operator.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/_operator.c b/Modules/_operator.c
index 12a5bf6..b3a8bef 100644
--- a/Modules/_operator.c
+++ b/Modules/_operator.c
@@ -704,10 +704,8 @@ static PyObject *
_operator_is__impl(PyObject *module, PyObject *a, PyObject *b)
/*[clinic end generated code: output=bcd47a402e482e1d input=5fa9b97df03c427f]*/
{
- PyObject *result;
- result = (a == b) ? Py_True : Py_False;
- Py_INCREF(result);
- return result;
+ PyObject *result = Py_Is(a, b) ? Py_True : Py_False;
+ return Py_NewRef(result);
}
/*[clinic input]