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 ==.
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index fc2d274..aeaf845 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -403,8 +403,7 @@
int cmp;
for (i = 0, cmp = 0 ; cmp == 0 && i < Py_SIZE(a); ++i)
- cmp = PyObject_RichCompareBool(el, PyTuple_GET_ITEM(a, i),
- Py_EQ);
+ cmp = PyObject_RichCompareBool(PyTuple_GET_ITEM(a, i), el, Py_EQ);
return cmp;
}