summaryrefslogtreecommitdiff
path: root/Objects/dictobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-08-04 14:12:48 +0300
committerGitHub <noreply@github.com>2019-08-04 14:12:48 +0300
commit18b711c5a7f90d88fb74748f18fa8ef49d8486c7 (patch)
treed04ab59ccadbade80f8999c921dd3a19b62a9cc9 /Objects/dictobject.c
parent17e52649c0e7e9389f1cc2444a53f059e24e6bca (diff)
downloadcpython-git-18b711c5a7f90d88fb74748f18fa8ef49d8486c7.tar.gz
bpo-37648: Fixed minor inconsistency in some __contains__. (GH-14904)
The collection's item is now always at the left and the needle is on the right of ==.
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r--Objects/dictobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index b6205d93ca..f168ad5d2f 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -4392,7 +4392,7 @@ dictitems_contains(_PyDictViewObject *dv, PyObject *obj)
return 0;
}
Py_INCREF(found);
- result = PyObject_RichCompareBool(value, found, Py_EQ);
+ result = PyObject_RichCompareBool(found, value, Py_EQ);
Py_DECREF(found);
return result;
}