summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2000-03-16 20:03:04 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2000-03-16 20:03:04 (GMT)
commitb631b8ede54fa7cbb59033017c0a192772832347 (patch)
tree0abc276d5a6d9a6fbce034fcbf9c4688ccdb605d
parente4d6293383f2f9df6740f855320681e88fe18573 (diff)
downloadcpython-b631b8ede54fa7cbb59033017c0a192772832347.zip
cpython-b631b8ede54fa7cbb59033017c0a192772832347.tar.gz
cpython-b631b8ede54fa7cbb59033017c0a192772832347.tar.bz2
fix list.append problems
-rw-r--r--Lib/compiler/transformer.py6
-rw-r--r--Tools/compiler/compiler/transformer.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py
index 0159c31..1531ec3 100644
--- a/Lib/compiler/transformer.py
+++ b/Lib/compiler/transformer.py
@@ -569,7 +569,7 @@ class Transformer:
type = _cmp_types[n[0]]
lineno = nl[1][2]
- results.append(type, self.com_node(nodelist[i]))
+ results.append((type, self.com_node(nodelist[i])))
# we need a special "compare" node so that we can distinguish
# 3 < x < 5 from (3 < x) < 5
@@ -836,7 +836,7 @@ class Transformer:
expr2 = None
else:
expr1 = expr2 = None
- clauses.append(expr1, expr2, self.com_node(nodelist[i+2]))
+ clauses.append((expr1, expr2, self.com_node(nodelist[i+2])))
if node[0] == token.NAME:
elseNode = self.com_node(nodelist[i+2])
@@ -958,7 +958,7 @@ class Transformer:
# dictmaker: test ':' test (',' test ':' value)* [',']
items = [ ]
for i in range(1, len(nodelist), 4):
- items.append(self.com_node(nodelist[i]), self.com_node(nodelist[i+2]))
+ items.append((self.com_node(nodelist[i]), self.com_node(nodelist[i+2])))
return Node('dict', items)
def com_apply_trailer(self, primaryNode, nodelist):
diff --git a/Tools/compiler/compiler/transformer.py b/Tools/compiler/compiler/transformer.py
index 0159c31..1531ec3 100644
--- a/Tools/compiler/compiler/transformer.py
+++ b/Tools/compiler/compiler/transformer.py
@@ -569,7 +569,7 @@ class Transformer:
type = _cmp_types[n[0]]
lineno = nl[1][2]
- results.append(type, self.com_node(nodelist[i]))
+ results.append((type, self.com_node(nodelist[i])))
# we need a special "compare" node so that we can distinguish
# 3 < x < 5 from (3 < x) < 5
@@ -836,7 +836,7 @@ class Transformer:
expr2 = None
else:
expr1 = expr2 = None
- clauses.append(expr1, expr2, self.com_node(nodelist[i+2]))
+ clauses.append((expr1, expr2, self.com_node(nodelist[i+2])))
if node[0] == token.NAME:
elseNode = self.com_node(nodelist[i+2])
@@ -958,7 +958,7 @@ class Transformer:
# dictmaker: test ':' test (',' test ':' value)* [',']
items = [ ]
for i in range(1, len(nodelist), 4):
- items.append(self.com_node(nodelist[i]), self.com_node(nodelist[i+2]))
+ items.append((self.com_node(nodelist[i]), self.com_node(nodelist[i+2])))
return Node('dict', items)
def com_apply_trailer(self, primaryNode, nodelist):