diff options
-rw-r--r-- | protocols.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/protocols.py b/protocols.py index 40de339c..9f21f1a1 100644 --- a/protocols.py +++ b/protocols.py @@ -82,7 +82,13 @@ def const_infer_binary_op(self, operator, other, context): if isinstance(other, nodes.Const): try: impl = BIN_OP_IMPL[operator] - yield const_factory(impl(self.value, other.value)) + + try: + yield const_factory(impl(self.value, other.value)) + except StandardError: + # ArithmeticError is not enough: float >> float is a TypeError + # TODO : let pylint know about the problem + pass except TypeError: # XXX log TypeError continue |