From 752abd0d3cc66f84f551650b8424248b202a16a4 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Tue, 13 May 2008 04:55:24 +0000 Subject: Convert a lot of print statements to print functions in docstrings, documentation, and unused/rarely used functions. --- Lib/test/test_global.py | 4 ++-- Lib/test/test_popen.py | 2 +- Lib/test/test_support.py | 2 +- Lib/test/test_tokenize.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'Lib/test') diff --git a/Lib/test/test_global.py b/Lib/test/test_global.py index 22e4b254c2..2a58a10a22 100644 --- a/Lib/test/test_global.py +++ b/Lib/test/test_global.py @@ -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 """ diff --git a/Lib/test/test_popen.py b/Lib/test/test_popen.py index 397e4a31ce..209bb13148 100644 --- a/Lib/test/test_popen.py +++ b/Lib/test/test_popen.py @@ -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 diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index 92592eb4d6..62d327eece 100644 --- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -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 diff --git a/Lib/test/test_tokenize.py b/Lib/test/test_tokenize.py index 371e2b99f4..ea9030b7c7 100644 --- a/Lib/test/test_tokenize.py +++ b/Lib/test/test_tokenize.py @@ -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 -- cgit v1.2.1