Commit 900bffc3 authored by Stefan Behnel's avatar Stefan Behnel

improve code readability

parent 64255591
......@@ -6546,21 +6546,20 @@ class TupleNode(SequenceNode):
self.is_temp = False
self.is_literal = True
return self
else:
if not skip_children:
self.args = [arg.analyse_types(env) for arg in self.args]
if not self.mult_factor and not any(arg.type.is_pyobject or arg.type.is_fused for arg in self.args):
if not self.mult_factor and not any((arg.type.is_pyobject or arg.type.is_fused) for arg in self.args):
self.type = env.declare_tuple_type(self.pos, (arg.type for arg in self.args)).type
self.is_temp = 1
return self
else:
node = SequenceNode.analyse_types(self, env, skip_children=True)
for child in node.args:
if not child.is_literal:
break
else:
if not node.mult_factor or node.mult_factor.is_literal and \
isinstance(node.mult_factor.constant_result, (int, long)):
if not all(child.is_literal for child in node.args):
return node
if not node.mult_factor or (
node.mult_factor.is_literal and isinstance(node.mult_factor.constant_result, (int, long))):
node.is_temp = False
node.is_literal = True
else:
......
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