summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2009-03-17 12:13:13 +0100
committerEmile Anclin <emile.anclin@logilab.fr>2009-03-17 12:13:13 +0100
commit69041de75ae6b40cc06c90c87276ca77089e67a0 (patch)
treedbe75db249a64ebeb4a14997d38c71d071dab0e1
parent82142837563bb867a0c613738ea0719a5b5e9d80 (diff)
downloadastroid-git-69041de75ae6b40cc06c90c87276ca77089e67a0.tar.gz
littls bug fixes
--HG-- branch : _ast_compat
-rw-r--r--_nodes_ast.py2
-rw-r--r--inference.py2
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