Commit e8a2a0bd authored by Stefan Behnel's avatar Stefan Behnel

code simplification

parent 57e40836
......@@ -314,12 +314,14 @@ class FlattenInListTransform(Visitor.VisitorTransform, SkipDeclarations):
else:
return node
if isinstance(node.operand2, ExprNodes.TupleNode) or isinstance(node.operand2, ExprNodes.ListNode):
if not isinstance(node.operand2, (ExprNodes.TupleNode, ExprNodes.ListNode)):
return node
args = node.operand2.args
if len(args) == 0:
return ExprNodes.BoolNode(pos = node.pos, value = node.operator == 'not_in')
if node.operand1.is_simple():
if True or node.operand1.is_simple():
lhs = node.operand1
else:
# FIXME: allocate temp for evaluated node.operand1
......@@ -347,8 +349,6 @@ class FlattenInListTransform(Visitor.VisitorTransform, SkipDeclarations):
operand2 = right)
return reduce(concat, conds)
else:
return node
def visit_Node(self, node):
self.visitchildren(node)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment