From b67f98d1e982b37ab80c32c019c5c221512e608e Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Mon, 16 Mar 2020 21:38:29 -0400 Subject: add __lt__ to referencesource objects and raise exception if invalid type --- python/function.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/function.py') diff --git a/python/function.py b/python/function.py index e0d179b2..bdd04590 100644 --- a/python/function.py +++ b/python/function.py @@ -752,7 +752,7 @@ class Function(object): def __lt__(self, value): if not isinstance(value, Function): - return False + raise TypeError("Can only compare to other Function objects") return self.start < value.start def __eq__(self, value): -- cgit v1.3.1