summaryrefslogtreecommitdiffstats
path: root/Lib/compiler/pycodegen.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-02-09 05:37:30 (GMT)
committerGuido van Rossum <guido@python.org>2007-02-09 05:37:30 (GMT)
commitbe19ed77ddb047e02fe94d142181062af6d99dcc (patch)
tree70f214e06554046fcccbadeb78665f25e07ce965 /Lib/compiler/pycodegen.py
parent452bf519a70c3db0e7f0d2540b1bfb07d9085583 (diff)
downloadcpython-be19ed77ddb047e02fe94d142181062af6d99dcc.zip
cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.gz
cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.bz2
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.)
Diffstat (limited to 'Lib/compiler/pycodegen.py')
-rw-r--r--Lib/compiler/pycodegen.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py
index a1dc971..0e49781 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):