mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
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:
parent
452bf519a7
commit
be19ed77dd
331 changed files with 2567 additions and 2648 deletions
|
@ -30,8 +30,7 @@ class CompilerTest(unittest.TestCase):
|
|||
# Print still working message since this test can be really slow
|
||||
if next_time <= time.time():
|
||||
next_time = time.time() + _PRINT_WORKING_MSG_INTERVAL
|
||||
print >>sys.__stdout__, \
|
||||
' testCompileLibrary still working, be patient...'
|
||||
print(' testCompileLibrary still working, be patient...', file=sys.__stdout__)
|
||||
sys.__stdout__.flush()
|
||||
|
||||
if not basename.endswith(".py"):
|
||||
|
@ -40,7 +39,7 @@ class CompilerTest(unittest.TestCase):
|
|||
continue
|
||||
path = os.path.join(dir, basename)
|
||||
if test.test_support.verbose:
|
||||
print "compiling", path
|
||||
print("compiling", path)
|
||||
f = open(path, "U")
|
||||
buf = f.read()
|
||||
f.close()
|
||||
|
@ -94,7 +93,7 @@ class CompilerTest(unittest.TestCase):
|
|||
try:
|
||||
self._check_lineno(node)
|
||||
except AssertionError:
|
||||
print node.__class__, node.lineno
|
||||
print(node.__class__, node.lineno)
|
||||
raise
|
||||
|
||||
def _check_lineno(self, node):
|
||||
|
@ -217,7 +216,7 @@ else:
|
|||
a, b = b, a
|
||||
|
||||
try:
|
||||
print yo
|
||||
print(yo)
|
||||
except:
|
||||
yo = 3
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue