Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1b66996

Browse files
committed
Fix nit (sentinel on lhs of comparison).
1 parent 08d01ee commit 1b66996

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Objects/iterobject.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,7 @@ calliter_iternext(calliterobject *it)
177177
Py_DECREF(args);
178178
if (result != NULL) {
179179
int ok;
180-
ok = PyObject_RichCompareBool(result,
181-
it->it_sentinel,
182-
Py_EQ);
180+
ok = PyObject_RichCompareBool(it->it_sentinel, result, Py_EQ);
183181
if (ok == 0)
184182
return result; /* Common case, fast path */
185183
Py_DECREF(result);

0 commit comments

Comments
 (0)