summaryrefslogtreecommitdiff
path: root/python/variable.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/variable.py')
-rw-r--r--python/variable.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/variable.py b/python/variable.py
index 3af779a5..d345e4b0 100644
--- a/python/variable.py
+++ b/python/variable.py
@@ -798,4 +798,7 @@ class AddressRange:
end:int # Exclusive ending address
def __repr__(self):
- return f"<{self.start:#x}-{self.end:#x}>" \ No newline at end of file
+ return f"<{self.start:#x}-{self.end:#x}>"
+
+ def __contains__(self, i:int):
+ return i >= self.start and i < self.end \ No newline at end of file