Commit a91e1650 authored by Fred Drake's avatar Fred Drake

In the containment test, get the boundary condition right. ">" was used

where ">=" should have been.

This closes bug #121965.
parent f4e13a45
......@@ -193,9 +193,9 @@ range_contains(rangeobject *r, PyObject *obj)
if (num < 0 && PyErr_Occurred())
return -1;
if (num < r->start || (num - r->start) % r->step)
if ((num < r->start) || ((num - r->start) % r->step))
return 0;
if (num > (r->start + (r->len * r->step)))
if (num >= (r->start + (r->len * r->step)))
return 0;
return 1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment