Commit f3cf8f30 authored by Duncan Macleod's avatar Duncan Macleod

Merge branch 'python-segment-contains' into 'master'

Fixed bug in python implementation of segment.__contains__

See merge request !5
parents d39c905f 3ebd6caf
Pipeline #24238 passed with stages
in 7 minutes and 29 seconds
...@@ -449,7 +449,7 @@ class segment(tuple): ...@@ -449,7 +449,7 @@ class segment(tuple):
""" """
try: try:
a, b = other a, b = other
except ValueError: except (ValueError, TypeError):
return self[0] <= other < self[1] return self[0] <= other < self[1]
else: else:
return (self[0] <= a) and (self[1] >= b) 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