Convert a lot of print statements to print functions in docstrings,

documentation, and unused/rarely used functions.
This commit is contained in:
Neal Norwitz 2008-05-13 04:55:24 +00:00
parent 8321f97891
commit 752abd0d3c
20 changed files with 53 additions and 50 deletions

View file

@ -21,7 +21,7 @@ def wrong1():
def test2(self):
prog_text_2 = """\
def wrong2():
print x
print(x)
global x
"""
check_syntax_error(self, prog_text_2)
@ -29,7 +29,7 @@ def wrong2():
def test3(self):
prog_text_3 = """\
def wrong3():
print x
print(x)
x = 2
global x
"""

View file

@ -10,7 +10,7 @@ import os, sys
# Test that command-lines get down as we expect.
# To do this we execute:
# python -c "import sys;print sys.argv" {rest_of_commandline}
# python -c "import sys;print(sys.argv)" {rest_of_commandline}
# This results in Python being spawned and printing the sys.argv list.
# We can then eval() the result of this, and see what each argv was.
python = sys.executable

View file

@ -481,7 +481,7 @@ def captured_output(stream_name):
Example use (with 'stream_name=stdout')::
with captured_stdout() as s:
print "hello"
print("hello")
assert s.getvalue() == "hello"
"""
import io

View file

@ -89,7 +89,7 @@ Some error-handling code
>>> roundtrip("try: import somemodule\\n"
... "except ImportError: # comment\\n"
... " print('Can not import' # comment2\\n)"
... "else: print 'Loaded'\\n")
... "else: print('Loaded')\\n")
True
Balancing continuation