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

@ -318,11 +318,11 @@ def _test():
l = [None, 1, 2, 3.14, 'xyzzy', (1, 2), [3.14, 'abc'],
{'abc': 'ABC'}, (), [], {}]
l1 = copy(l)
print l1==l
print(l1==l)
l1 = map(copy, l)
print l1==l
print(l1==l)
l1 = deepcopy(l)
print l1==l
print(l1==l)
class C:
def __init__(self, arg=None):
self.a = 1
@ -346,26 +346,26 @@ def _test():
c = C('argument sketch')
l.append(c)
l2 = copy(l)
print l == l2
print l
print l2
print(l == l2)
print(l)
print(l2)
l2 = deepcopy(l)
print l == l2
print l
print l2
print(l == l2)
print(l)
print(l2)
l.append({l[1]: l, 'xyz': l[2]})
l3 = copy(l)
import repr
print map(repr.repr, l)
print map(repr.repr, l1)
print map(repr.repr, l2)
print map(repr.repr, l3)
print(map(repr.repr, l))
print(map(repr.repr, l1))
print(map(repr.repr, l2))
print(map(repr.repr, l3))
l3 = deepcopy(l)
import repr
print map(repr.repr, l)
print map(repr.repr, l1)
print map(repr.repr, l2)
print map(repr.repr, l3)
print(map(repr.repr, l))
print(map(repr.repr, l1))
print(map(repr.repr, l2))
print(map(repr.repr, l3))
if __name__ == '__main__':
_test()