diff options
author | Guido van Rossum <guido@python.org> | 2007-02-09 05:37:30 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-02-09 05:37:30 (GMT) |
commit | be19ed77ddb047e02fe94d142181062af6d99dcc (patch) | |
tree | 70f214e06554046fcccbadeb78665f25e07ce965 /Lib/test/crashers | |
parent | 452bf519a70c3db0e7f0d2540b1bfb07d9085583 (diff) | |
download | cpython-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/test/crashers')
-rw-r--r-- | Lib/test/crashers/bogus_sre_bytecode.py | 2 | ||||
-rw-r--r-- | Lib/test/crashers/borrowed_ref_1.py | 2 | ||||
-rw-r--r-- | Lib/test/crashers/borrowed_ref_2.py | 2 | ||||
-rw-r--r-- | Lib/test/crashers/gc_inspection.py | 4 | ||||
-rw-r--r-- | Lib/test/crashers/loosing_mro_ref.py | 2 | ||||
-rw-r--r-- | Lib/test/crashers/modify_dict_attr.py | 2 | ||||
-rw-r--r-- | Lib/test/crashers/nasty_eq_vs_dict.py | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/Lib/test/crashers/bogus_sre_bytecode.py b/Lib/test/crashers/bogus_sre_bytecode.py index 4bfc730..7f006d9 100644 --- a/Lib/test/crashers/bogus_sre_bytecode.py +++ b/Lib/test/crashers/bogus_sre_bytecode.py @@ -38,7 +38,7 @@ ss = ["", "world", "x" * 500] while 1: code = [pick() for i in range(random.randrange(5, 25))] - print code + print(code) pat = _sre.compile(None, 0, code) for s in ss: try: diff --git a/Lib/test/crashers/borrowed_ref_1.py b/Lib/test/crashers/borrowed_ref_1.py index d16ede2..b82f464 100644 --- a/Lib/test/crashers/borrowed_ref_1.py +++ b/Lib/test/crashers/borrowed_ref_1.py @@ -8,7 +8,7 @@ class A(object): class B(object): def __del__(self): - print 'hi' + print('hi') del D.__missing__ class D(dict): diff --git a/Lib/test/crashers/borrowed_ref_2.py b/Lib/test/crashers/borrowed_ref_2.py index 1a7b3ff..f3ca350 100644 --- a/Lib/test/crashers/borrowed_ref_2.py +++ b/Lib/test/crashers/borrowed_ref_2.py @@ -10,7 +10,7 @@ class A(object): class B(object): def __del__(self): - print "hi" + print("hi") del C.d class D(object): diff --git a/Lib/test/crashers/gc_inspection.py b/Lib/test/crashers/gc_inspection.py index 10caa79..ae85f97 100644 --- a/Lib/test/crashers/gc_inspection.py +++ b/Lib/test/crashers/gc_inspection.py @@ -25,8 +25,8 @@ def g(): yield marker # now the marker is in the tuple being constructed [tup] = [x for x in gc.get_referrers(marker) if type(x) is tuple] - print tup - print tup[1] + print(tup) + print(tup[1]) tuple(g()) diff --git a/Lib/test/crashers/loosing_mro_ref.py b/Lib/test/crashers/loosing_mro_ref.py index f0b8047..5ecde63 100644 --- a/Lib/test/crashers/loosing_mro_ref.py +++ b/Lib/test/crashers/loosing_mro_ref.py @@ -32,5 +32,5 @@ class X(Base): # there from the beginning :-) locals()[MyKey()] = 5 -print X.mykey +print(X.mykey) # I get a segfault, or a slightly wrong assertion error in a debug build. diff --git a/Lib/test/crashers/modify_dict_attr.py b/Lib/test/crashers/modify_dict_attr.py index dfce467..2a8fce0 100644 --- a/Lib/test/crashers/modify_dict_attr.py +++ b/Lib/test/crashers/modify_dict_attr.py @@ -16,4 +16,4 @@ class MyClass(object): if __name__ == '__main__': del MyClass.__dict__ # if we set tp_dict to NULL, - print MyClass # doing anything with MyClass segfaults + print(MyClass) # doing anything with MyClass segfaults diff --git a/Lib/test/crashers/nasty_eq_vs_dict.py b/Lib/test/crashers/nasty_eq_vs_dict.py index 3f3083d..85f7caf 100644 --- a/Lib/test/crashers/nasty_eq_vs_dict.py +++ b/Lib/test/crashers/nasty_eq_vs_dict.py @@ -44,4 +44,4 @@ dict = {y: "OK!"} z = Yuck() y.make_dangerous() -print dict[z] +print(dict[z]) |