summaryrefslogtreecommitdiffstats
path: root/Lib/compiler/symbols.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/symbols.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/symbols.py')
-rw-r--r--Lib/compiler/symbols.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/Lib/compiler/symbols.py b/Lib/compiler/symbols.py
index 3585efc..6c19b5b 100644
--- a/Lib/compiler/symbols.py
+++ b/Lib/compiler/symbols.py
@@ -76,12 +76,12 @@ class Scope:
return self.children
def DEBUG(self):
- print >> sys.stderr, self.name, self.nested and "nested" or ""
- print >> sys.stderr, "\tglobals: ", self.globals
- print >> sys.stderr, "\tcells: ", self.cells
- print >> sys.stderr, "\tdefs: ", self.defs
- print >> sys.stderr, "\tuses: ", self.uses
- print >> sys.stderr, "\tfrees:", self.frees
+ print(self.name, self.nested and "nested" or "", file=sys.stderr)
+ print("\tglobals: ", self.globals, file=sys.stderr)
+ print("\tcells: ", self.cells, file=sys.stderr)
+ print("\tdefs: ", self.defs, file=sys.stderr)
+ print("\tuses: ", self.uses, file=sys.stderr)
+ print("\tfrees:", self.frees, file=sys.stderr)
def check_name(self, name):
"""Return scope of name.
@@ -429,7 +429,7 @@ if __name__ == "__main__":
if not (s.startswith('_[') or s.startswith('.'))]
for file in sys.argv[1:]:
- print file
+ print(file)
f = open(file)
buf = f.read()
f.close()
@@ -443,10 +443,10 @@ if __name__ == "__main__":
names2 = s.scopes[tree].get_names()
if not list_eq(mod_names, names2):
- print
- print "oops", file
- print sorted(mod_names)
- print sorted(names2)
+ print()
+ print("oops", file)
+ print(sorted(mod_names))
+ print(sorted(names2))
sys.exit(-1)
d = {}
@@ -460,11 +460,11 @@ if __name__ == "__main__":
l = [sc for sc in scopes
if sc.name == s.get_name()]
if len(l) > 1:
- print "skipping", s.get_name()
+ print("skipping", s.get_name())
else:
if not list_eq(get_names(s.get_namespace()),
l[0].get_names()):
- print s.get_name()
- print sorted(get_names(s.get_namespace()))
- print sorted(l[0].get_names())
+ print(s.get_name())
+ print(sorted(get_names(s.get_namespace())))
+ print(sorted(l[0].get_names()))
sys.exit(-1)