[Python-checkins] cpython (3.5): Issue #28045: Fix comment in range_contains_long()

berker.peksag python-checkins at python.org
Mon Sep 12 00:46:55 EDT 2016


https://hg.python.org/cpython/rev/957084395042
changeset:   103686:957084395042
branch:      3.5
parent:      103676:c26dce72a4da
user:        Berker Peksag <berker.peksag at gmail.com>
date:        Mon Sep 12 07:47:04 2016 +0300
summary:
  Issue #28045: Fix comment in range_contains_long()

Patch by wim glenn.

files:
  Objects/rangeobject.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -406,7 +406,7 @@
     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);

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list