bpo-39737: Remove code repitition in list_richcompare (GH-18638)

I may speed up list comparison on some platforms.
This commit is contained in:
sweeneyde 2020-02-26 02:00:35 -05:00 committed by GitHub
parent 57c7a0bdf4
commit be7ead62db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -2643,8 +2643,7 @@ list_richcompare(PyObject *v, PyObject *w, int op)
Py_INCREF(vitem);
Py_INCREF(witem);
int k = PyObject_RichCompareBool(vl->ob_item[i],
wl->ob_item[i], Py_EQ);
int k = PyObject_RichCompareBool(vitem, witem, Py_EQ);
Py_DECREF(vitem);
Py_DECREF(witem);
if (k < 0)