diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2010-06-14 14:08:50 +0200 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2010-06-14 14:08:50 +0200 |
commit | fd8a5e4c8b7121b2e054d191779043d6ab7f34d0 (patch) | |
tree | 3d165a37d83221f216a4e0784eae3d4e1d6d45b6 /protocols.py | |
parent | ee38728de2375ed2cf04ec6b344c2ca85da07505 (diff) | |
download | astroid-git-fd8a5e4c8b7121b2e054d191779043d6ab7f34d0.tar.gz |
[fix] yield YES on multiplication of tuple/list with non valid operand
--HG--
branch : stable
Diffstat (limited to 'protocols.py')
-rw-r--r-- | protocols.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/protocols.py b/protocols.py index e1e2fb4d..22163b58 100644 --- a/protocols.py +++ b/protocols.py @@ -128,6 +128,9 @@ def tl_infer_binary_op(self, operator, other, context): node.elts = elts yield node elif isinstance(other, nodes.Const) and operator == '*': + if not isinstance(other.value, int): + yield YES + continue node = self.__class__() elts = [n for elt in self.elts for n in elt.infer(context) if not n is YES] * other.value |