diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-02-14 18:32:46 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-02-14 18:32:46 (GMT) |
commit | 42907790b61419882e112dab645ac1b53fd24148 (patch) | |
tree | 76d9c4e585678fd96597ed59fd26c9f0f6a44836 /Tools/compiler | |
parent | e817acd957c8be17caa6711ddd00e44aa793b355 (diff) | |
download | cpython-42907790b61419882e112dab645ac1b53fd24148.zip cpython-42907790b61419882e112dab645ac1b53fd24148.tar.gz cpython-42907790b61419882e112dab645ac1b53fd24148.tar.bz2 |
(), [], and {} should not be represented as constant expressions, they
should be calls to BUILD_ ops for these types with no arguments
Diffstat (limited to 'Tools/compiler')
-rw-r--r-- | Tools/compiler/compiler/transformer.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Tools/compiler/compiler/transformer.py b/Tools/compiler/compiler/transformer.py index b85b498..2fb442a 100644 --- a/Tools/compiler/compiler/transformer.py +++ b/Tools/compiler/compiler/transformer.py @@ -656,21 +656,21 @@ class Transformer: t = nodelist[0][0] if t == token.LPAR: if nodelist[1][0] == token.RPAR: - n = Node('const', ()) + n = Node('tuple', ()) n.lineno = nodelist[0][2] return n return self.com_node(nodelist[1]) if t == token.LSQB: if nodelist[1][0] == token.RSQB: - n = Node('const', [ ]) + n = Node('list', ()) n.lineno = nodelist[0][2] return n return self.com_list_constructor(nodelist[1]) if t == token.LBRACE: if nodelist[1][0] == token.RBRACE: - return Node('const', { }) + return Node('dict', ()) return self.com_dictmaker(nodelist[1]) if t == token.BACKQUOTE: |