summaryrefslogtreecommitdiff
path: root/Modules/_functoolsmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_functoolsmodule.c')
-rw-r--r--Modules/_functoolsmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c
index ab0839cdc7..0c0fae1a97 100644
--- a/Modules/_functoolsmodule.c
+++ b/Modules/_functoolsmodule.c
@@ -573,7 +573,7 @@ keyobject_richcompare(PyObject *ko, PyObject *other, int op)
PyObject *answer;
PyObject* stack[2];
- if (Py_TYPE(other) != &keyobject_type){
+ if (!Py_IS_TYPE(other, &keyobject_type)) {
PyErr_Format(PyExc_TypeError, "other argument must be K instance");
return NULL;
}