summaryrefslogtreecommitdiffstats
path: root/Modules/_ssl.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-08-04 11:12:48 (GMT)
committerGitHub <noreply@github.com>2019-08-04 11:12:48 (GMT)
commit18b711c5a7f90d88fb74748f18fa8ef49d8486c7 (patch)
treed04ab59ccadbade80f8999c921dd3a19b62a9cc9 /Modules/_ssl.c
parent17e52649c0e7e9389f1cc2444a53f059e24e6bca (diff)
downloadcpython-18b711c5a7f90d88fb74748f18fa8ef49d8486c7.zip
cpython-18b711c5a7f90d88fb74748f18fa8ef49d8486c7.tar.gz
cpython-18b711c5a7f90d88fb74748f18fa8ef49d8486c7.tar.bz2
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 'Modules/_ssl.c')
-rw-r--r--Modules/_ssl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index da30cbb..3d54b84 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -5600,8 +5600,7 @@ list_contains(PyListObject *a, PyObject *el)
int cmp;
for (i = 0, cmp = 0 ; cmp == 0 && i < Py_SIZE(a); ++i)
- cmp = PyObject_RichCompareBool(el, PyList_GET_ITEM(a, i),
- Py_EQ);
+ cmp = PyObject_RichCompareBool(PyList_GET_ITEM(a, i), el, Py_EQ);
return cmp;
}