]> granicus.if.org Git - python/commitdiff
Fix nit (sentinel on lhs of comparison).
authorRaymond Hettinger <python@rcn.com>
Sat, 7 Aug 2010 05:54:08 +0000 (05:54 +0000)
committerRaymond Hettinger <python@rcn.com>
Sat, 7 Aug 2010 05:54:08 +0000 (05:54 +0000)
Objects/iterobject.c

index b534b4af8e63b8092f2ff920a07a9e16fed75824..91a93f55be24558f742b84d51a69f668ce5591f7 100644 (file)
@@ -177,9 +177,7 @@ calliter_iternext(calliterobject *it)
         Py_DECREF(args);
         if (result != NULL) {
             int ok;
-            ok = PyObject_RichCompareBool(result,
-                                          it->it_sentinel,
-                                          Py_EQ);
+            ok = PyObject_RichCompareBool(it->it_sentinel, result, Py_EQ);               
             if (ok == 0)
                 return result; /* Common case, fast path */
             Py_DECREF(result);