From a9ab9dd833ed081abbed647aa16eeaa2f61b85d7 Mon Sep 17 00:00:00 2001 From: David Kerkeslager Date: Wed, 28 Aug 2019 11:54:01 -0400 Subject: [PATCH] Simplify list construction --- normalization.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/normalization.py b/normalization.py index 76c5395..309e84c 100644 --- a/normalization.py +++ b/normalization.py @@ -162,8 +162,6 @@ def normalize_list_literal_expression(counter, expression): prestatements = [] - list_expression = NormalVariableExpression(variable=list_variable) - for item_expression in expression.item_expression_list: counter, item_expression_prestatements, normalized = normalize_expression( counter, @@ -179,15 +177,10 @@ def normalize_list_literal_expression(counter, expression): ) ) - prestatements.append(NormalVariableInitializationStatement( - variable=list_variable, - expression=NormalListConstructExpression(allocate=len(expression.item_expression_list)), - )) - return ( counter, tuple(prestatements), - list_expression, + NormalListConstructExpression(allocate=len(expression.item_expression_list)), ) def normalize_string_literal_expression(counter, expression): -- 2.20.1