]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #28045: Fix comment in range_contains_long()
authorBerker Peksag <berker.peksag@gmail.com>
Mon, 12 Sep 2016 04:47:04 +0000 (07:47 +0300)
committerBerker Peksag <berker.peksag@gmail.com>
Mon, 12 Sep 2016 04:47:04 +0000 (07:47 +0300)
Patch by wim glenn.

Objects/rangeobject.c

index 0e9eb20154b7a0cf8d961263c6e02888d54a7632..288be4fb6939c00f28a3d1e7343fd7b9e27c844c 100644 (file)
@@ -406,7 +406,7 @@ range_contains_long(rangeobject *r, PyObject *ob)
     tmp2 = PyNumber_Remainder(tmp1, r->step);
     if (tmp2 == NULL)
         goto end;
-    /* result = (int(ob) - start % step) == 0 */
+    /* result = ((int(ob) - start) % step) == 0 */
     result = PyObject_RichCompareBool(tmp2, zero, Py_EQ);
   end:
     Py_XDECREF(tmp1);