summaryrefslogtreecommitdiffstats
path: root/Lib/StringIO.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-02-09 05:37:30 (GMT)
committerGuido van Rossum <guido@python.org>2007-02-09 05:37:30 (GMT)
commitbe19ed77ddb047e02fe94d142181062af6d99dcc (patch)
tree70f214e06554046fcccbadeb78665f25e07ce965 /Lib/StringIO.py
parent452bf519a70c3db0e7f0d2540b1bfb07d9085583 (diff)
downloadcpython-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/StringIO.py')
-rw-r--r--Lib/StringIO.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/StringIO.py b/Lib/StringIO.py
index 9394360..a6b0ea4 100644
--- a/Lib/StringIO.py
+++ b/Lib/StringIO.py
@@ -291,14 +291,14 @@ def test():
if f.getvalue() != text:
raise RuntimeError, 'write failed'
length = f.tell()
- print 'File length =', length
+ print('File length =', length)
f.seek(len(lines[0]))
f.write(lines[1])
f.seek(0)
- print 'First line =', repr(f.readline())
- print 'Position =', f.tell()
+ print('First line =', repr(f.readline()))
+ print('Position =', f.tell())
line = f.readline()
- print 'Second line =', repr(line)
+ print('Second line =', repr(line))
f.seek(-len(line), 1)
line2 = f.read(len(line))
if line != line2:
@@ -310,13 +310,13 @@ def test():
line2 = f.read()
if line != line2:
raise RuntimeError, 'bad result after seek back from EOF'
- print 'Read', len(list), 'more lines'
- print 'File length =', f.tell()
+ print('Read', len(list), 'more lines')
+ print('File length =', f.tell())
if f.tell() != length:
raise RuntimeError, 'bad length'
f.truncate(length/2)
f.seek(0, 2)
- print 'Truncated length =', f.tell()
+ print('Truncated length =', f.tell())
if f.tell() != length/2:
raise RuntimeError, 'truncate did not adjust length'
f.close()