summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/rangeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index 213f3dd..beff030 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -275,7 +275,7 @@ range_reduce(rangeobject *r, PyObject *args)
static int
range_contains(rangeobject *r, PyObject *ob) {
- if (PyLong_Check(ob)) {
+ if (PyLong_CheckExact(ob) || PyBool_Check(ob)) {
int cmp1, cmp2, cmp3;
PyObject *tmp1 = NULL;
PyObject *tmp2 = NULL;