summaryrefslogtreecommitdiffstats
path: root/Tools/unicode/comparecodecs.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-03 17:06:41 (GMT)
committerCollin Winter <collinw@gmail.com>2007-08-03 17:06:41 (GMT)
commit6afaeb757af0dbd8508a0f2352ade61e41bec84c (patch)
treef1b31bc7138b17ff39791bbb45aa81583c3b6e46 /Tools/unicode/comparecodecs.py
parente5d0e8431f929cad2da77b63fe1b7dc0ff21a428 (diff)
downloadcpython-6afaeb757af0dbd8508a0f2352ade61e41bec84c.zip
cpython-6afaeb757af0dbd8508a0f2352ade61e41bec84c.tar.gz
cpython-6afaeb757af0dbd8508a0f2352ade61e41bec84c.tar.bz2
Convert print statements to function calls in Tools/.
Diffstat (limited to 'Tools/unicode/comparecodecs.py')
-rw-r--r--Tools/unicode/comparecodecs.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Tools/unicode/comparecodecs.py b/Tools/unicode/comparecodecs.py
index a293283..c291be4 100644
--- a/Tools/unicode/comparecodecs.py
+++ b/Tools/unicode/comparecodecs.py
@@ -11,7 +11,7 @@ import sys
def compare_codecs(encoding1, encoding2):
- print 'Comparing encoding/decoding of %r and %r' % (encoding1, encoding2)
+ print('Comparing encoding/decoding of %r and %r' % (encoding1, encoding2))
mismatch = 0
# Check encoding
for i in range(sys.maxunicode):
@@ -25,8 +25,8 @@ def compare_codecs(encoding1, encoding2):
except UnicodeError as reason:
c2 = '<undefined>'
if c1 != c2:
- print ' * encoding mismatch for 0x%04X: %-14r != %r' % \
- (i, c1, c2)
+ print(' * encoding mismatch for 0x%04X: %-14r != %r' % \
+ (i, c1, c2))
mismatch += 1
# Check decoding
for i in range(256):
@@ -40,14 +40,14 @@ def compare_codecs(encoding1, encoding2):
except UnicodeError:
u2 = u'<undefined>'
if u1 != u2:
- print ' * decoding mismatch for 0x%04X: %-14r != %r' % \
- (i, u1, u2)
+ print(' * decoding mismatch for 0x%04X: %-14r != %r' % \
+ (i, u1, u2))
mismatch += 1
if mismatch:
- print
- print 'Found %i mismatches' % mismatch
+ print()
+ print('Found %i mismatches' % mismatch)
else:
- print '-> Codecs are identical.'
+ print('-> Codecs are identical.')
if __name__ == '__main__':
compare_codecs(sys.argv[1], sys.argv[2])