From be19ed77ddb047e02fe94d142181062af6d99dcc Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 9 Feb 2007 05:37:30 +0000 Subject: Fix most trivially-findable print statements. There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.) --- Lib/compiler/pycodegen.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Lib/compiler/pycodegen.py') diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py index a1dc9716cfb..0e497817a31 100644 --- a/Lib/compiler/pycodegen.py +++ b/Lib/compiler/pycodegen.py @@ -112,7 +112,7 @@ class Module(AbstractCompileMode): gen = ModuleCodeGenerator(tree) if display: import pprint - print pprint.pprint(tree) + print(pprint.pprint(tree)) self.code = gen.getCode() def dump(self, f): @@ -1018,7 +1018,7 @@ class CodeGenerator: self.set_lineno(node) self.delName(node.name) else: - print "oops", node.flags + print("oops", node.flags) def visitAssAttr(self, node): self.visit(node.expr) @@ -1027,8 +1027,8 @@ class CodeGenerator: elif node.flags == 'OP_DELETE': self.emit('DELETE_ATTR', self.mangle(node.attrname)) else: - print "warning: unexpected flags:", node.flags - print node + print("warning: unexpected flags:", node.flags) + print(node) def _visitAssSequence(self, node, op='UNPACK_SEQUENCE'): if findOp(node) != 'OP_DELETE': @@ -1189,7 +1189,7 @@ class CodeGenerator: elif node.flags == 'OP_DELETE': self.emit('DELETE_SLICE+%d' % slice) else: - print "weird slice", node.flags + print("weird slice", node.flags) raise def visitSubscript(self, node, aug_flag=None): -- cgit v1.2.3