diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-11-10 16:28:17 +0000 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-11-10 16:28:17 +0000 |
commit | ff8e71c21d688605e2a981bc9a7ed3aa6c12aebd (patch) | |
tree | b6fecc18fe1607216c45232569eb81da56e4c0e9 /exts | |
parent | a2438ec7a4191c177f0cb353fc92f2d8995e2803 (diff) | |
download | import-ff8e71c21d688605e2a981bc9a7ed3aa6c12aebd.tar.gz |
define __le__ and __ge__
Diffstat (limited to 'exts')
-rwxr-xr-x | exts/pip_find_deps.py | 10 |
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] |