diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2009-03-17 12:13:13 +0100 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2009-03-17 12:13:13 +0100 |
commit | 69041de75ae6b40cc06c90c87276ca77089e67a0 (patch) | |
tree | dbe75db249a64ebeb4a14997d38c71d071dab0e1 | |
parent | 82142837563bb867a0c613738ea0719a5b5e9d80 (diff) | |
download | astroid-git-69041de75ae6b40cc06c90c87276ca77089e67a0.tar.gz |
littls bug fixes
--HG--
branch : _ast_compat
-rw-r--r-- | _nodes_ast.py | 2 | ||||
-rw-r--r-- | inference.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/_nodes_ast.py b/_nodes_ast.py index 3b64dd18..ed2afd9c 100644 --- a/_nodes_ast.py +++ b/_nodes_ast.py @@ -250,6 +250,8 @@ class TreeRebuilder(ASTVisitor): if slices.step: node.subs.append(slices.step) node.sliceflag = 'slice' + else: + node.subs = [] del node.slice, node.value def visit_unaryop(self, node): diff --git a/inference.py b/inference.py index ea2ab84c..ee5634bb 100644 --- a/inference.py +++ b/inference.py @@ -356,7 +356,7 @@ BIN_OP_METHOD = {'+': '__add__', def _infer_binop(operator, operand1, operand2, context, failures=None): if operand1 is YES: - yield lhs + yield operand1 try: for valnode in operand1.infer_binary_op(operator, operand2, context): yield valnode |