diff options
author | Georg Brandl <georg@python.org> | 2007-02-09 21:28:07 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-02-09 21:28:07 (GMT) |
commit | 88fc6646d1b97cb3ba6188808e7c016884d44a73 (patch) | |
tree | 4cf73aca05a06e89ae71a719c7b2329af51392b8 /Lib/compiler/transformer.py | |
parent | 08c47ba0df4ba87cdce34c126e5bdb28f8c6034c (diff) | |
download | cpython-88fc6646d1b97cb3ba6188808e7c016884d44a73.zip cpython-88fc6646d1b97cb3ba6188808e7c016884d44a73.tar.gz cpython-88fc6646d1b97cb3ba6188808e7c016884d44a73.tar.bz2 |
* Remove PRINT_ITEM(_TO), PRINT_NEWLINE(_TO) opcodes.
* Fix some docstrings and one Print -> print.
* Fix test_{class,code,descrtut,dis,extcall,parser,popen,pkg,subprocess,syntax,traceback}.
These were the ones that generated code with a print statement.
In most remaining failing tests there's an issue with the soft space.
Diffstat (limited to 'Lib/compiler/transformer.py')
-rw-r--r-- | Lib/compiler/transformer.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py index 3a2be13..5f2face 100644 --- a/Lib/compiler/transformer.py +++ b/Lib/compiler/transformer.py @@ -387,26 +387,6 @@ class Transformer: return AugAssign(lval, op[1], exprNode, lineno=op[2]) raise WalkerError, "can't get here" - def print_stmt(self, nodelist): - # print ([ test (',' test)* [','] ] | '>>' test [ (',' test)+ [','] ]) - items = [] - if len(nodelist) == 1: - start = 1 - dest = None - elif nodelist[1][0] == token.RIGHTSHIFT: - assert len(nodelist) == 3 \ - or nodelist[3][0] == token.COMMA - dest = self.com_node(nodelist[2]) - start = 4 - else: - dest = None - start = 1 - for i in range(start, len(nodelist), 2): - items.append(self.com_node(nodelist[i])) - if nodelist[-1][0] == token.COMMA: - return Print(items, dest, lineno=nodelist[0][2]) - return Printnl(items, dest, lineno=nodelist[0][2]) - def del_stmt(self, nodelist): return self.com_assign(nodelist[1], OP_DELETE) @@ -1480,7 +1460,6 @@ _legal_node_types = [ symbol.simple_stmt, symbol.compound_stmt, symbol.expr_stmt, - symbol.print_stmt, symbol.del_stmt, symbol.pass_stmt, symbol.break_stmt, |