summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-11-10 16:28:17 +0000
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-11-10 16:28:17 +0000
commitff8e71c21d688605e2a981bc9a7ed3aa6c12aebd (patch)
treeb6fecc18fe1607216c45232569eb81da56e4c0e9
parenta2438ec7a4191c177f0cb353fc92f2d8995e2803 (diff)
downloadimport-ff8e71c21d688605e2a981bc9a7ed3aa6c12aebd.tar.gz
define __le__ and __ge__
-rwxr-xr-xexts/pip_find_deps.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/exts/pip_find_deps.py b/exts/pip_find_deps.py
index 18efb58..30b0c68 100755
--- a/exts/pip_find_deps.py
+++ b/exts/pip_find_deps.py
@@ -95,6 +95,16 @@ class Bound(object):
x = self.val(x)
return x >= self.value if self.inclusive else x > self.value
+ def __le__(self, x):
+ print('__le__ self: %s, x: %s' % (self, x))
+ x = self.val(x)
+ return x <= self.value
+
+ def __ge__(self, x):
+ print('__ge__ self: %s, x: %s' % (self, x))
+ x = self.val(x)
+ return x >= self.value
+
def _symbol(self):
return self.symbols[self.bound_type][self.inclusive]