commit | 18b711c5a7f90d88fb74748f18fa8ef49d8486c7 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Sun Aug 04 14:12:48 2019 +0300 |
committer | GitHub <noreply@github.com> | Sun Aug 04 14:12:48 2019 +0300 |
tree | d04ab59ccadbade80f8999c921dd3a19b62a9cc9 | |
parent | 17e52649c0e7e9389f1cc2444a53f059e24e6bca [diff] [blame] |
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/abstract.c b/Objects/abstract.c index db1c306..f93d73f 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c
@@ -2016,7 +2016,7 @@ break; } - cmp = PyObject_RichCompareBool(obj, item, Py_EQ); + cmp = PyObject_RichCompareBool(item, obj, Py_EQ); Py_DECREF(item); if (cmp < 0) goto Fail;