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.)
This commit is contained in:
Guido van Rossum 2007-02-09 05:37:30 +00:00
parent 452bf519a7
commit be19ed77dd
331 changed files with 2567 additions and 2648 deletions

View file

@ -103,30 +103,30 @@ class SubPattern:
nl = 1
seqtypes = type(()), type([])
for op, av in self.data:
print level*" " + op,; nl = 0
print(level*" " + op, end=' '); nl = 0
if op == "in":
# member sublanguage
print; nl = 1
print(); nl = 1
for op, a in av:
print (level+1)*" " + op, a
print((level+1)*" " + op, a)
elif op == "branch":
print; nl = 1
print(); nl = 1
i = 0
for a in av[1]:
if i > 0:
print level*" " + "or"
print(level*" " + "or")
a.dump(level+1); nl = 1
i = i + 1
elif type(av) in seqtypes:
for a in av:
if isinstance(a, SubPattern):
if not nl: print
if not nl: print()
a.dump(level+1); nl = 1
else:
print a, ; nl = 0
print(a, end=' ') ; nl = 0
else:
print av, ; nl = 0
if not nl: print
print(av, end=' ') ; nl = 0
if not nl: print()
def __repr__(self):
return repr(self.data)
def __len__(self):