diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-03-16 20:03:04 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-03-16 20:03:04 (GMT) |
commit | b631b8ede54fa7cbb59033017c0a192772832347 (patch) | |
tree | 0abc276d5a6d9a6fbce034fcbf9c4688ccdb605d /Lib/compiler | |
parent | e4d6293383f2f9df6740f855320681e88fe18573 (diff) | |
download | cpython-b631b8ede54fa7cbb59033017c0a192772832347.zip cpython-b631b8ede54fa7cbb59033017c0a192772832347.tar.gz cpython-b631b8ede54fa7cbb59033017c0a192772832347.tar.bz2 |
fix list.append problems
Diffstat (limited to 'Lib/compiler')
-rw-r--r-- | Lib/compiler/transformer.py | 6 |
1 files changed, 3 insertions, 3 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): |