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

Skip to content

Commit ed6224e

Browse files
committed
Issue #28045: Fix comment in range_contains_long()
Patch by wim glenn.
1 parent c5ee3ca commit ed6224e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/rangeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ range_contains_long(rangeobject *r, PyObject *ob)
406406
tmp2 = PyNumber_Remainder(tmp1, r->step);
407407
if (tmp2 == NULL)
408408
goto end;
409-
/* result = (int(ob) - start % step) == 0 */
409+
/* result = ((int(ob) - start) % step) == 0 */
410410
result = PyObject_RichCompareBool(tmp2, zero, Py_EQ);
411411
end:
412412
Py_XDECREF(tmp1);

0 commit comments

Comments
 (0)