From ff8e71c21d688605e2a981bc9a7ed3aa6c12aebd Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Mon, 10 Nov 2014 16:28:17 +0000 Subject: define __le__ and __ge__ --- exts/pip_find_deps.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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] -- cgit v1.2.1