segment.__contains__: fixed python implementation bug

need to catch actual error thrown when `int` given
parent d39c905f
......@@ -449,7 +449,7 @@ class segment(tuple):
a, b = other
except ValueError:
except (ValueError, TypeError):
return self[0] <= other < self[1]
return (self[0] <= a) and (self[1] >= b)
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