summaryrefslogtreecommitdiffstats
path: root/Lib/gopherlib.py
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2004-02-12 17:35:32 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2004-02-12 17:35:32 (GMT)
commit70a6b49821a3226f55e9716f32d802d06640cb89 (patch)
tree3c8ca10c1fa09e025bd266cf855a00d7d96c55aa /Lib/gopherlib.py
parentecfeb7f095dfd9c1c8929bf3df858ee35e0d9e9e (diff)
downloadcpython-70a6b49821a3226f55e9716f32d802d06640cb89.zip
cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.gz
cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.bz2
Replace backticks with repr() or "%r"
From SF patch #852334.
Diffstat (limited to 'Lib/gopherlib.py')
-rw-r--r--Lib/gopherlib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/gopherlib.py b/Lib/gopherlib.py
index 03801d0..01eab0a 100644
--- a/Lib/gopherlib.py
+++ b/Lib/gopherlib.py
@@ -47,7 +47,7 @@ def type_to_name(gtype):
_type_to_name_map[eval(name)] = name[2:]
if gtype in _type_to_name_map:
return _type_to_name_map[gtype]
- return 'TYPE=' + `gtype`
+ return 'TYPE=%r' % (gtype,)
# Names for characters and strings
CRLF = '\r\n'
@@ -113,7 +113,7 @@ def get_directory(f):
gtype = line[0]
parts = line[1:].split(TAB)
if len(parts) < 4:
- print '(Bad line from server:', `line`, ')'
+ print '(Bad line from server: %r)' % (line,)
continue
if len(parts) > 4:
if parts[4:] != ['+']:
@@ -198,7 +198,7 @@ def test():
for item in entries: print item
else:
data = get_binary(f)
- print 'binary data:', len(data), 'bytes:', `data[:100]`[:40]
+ print 'binary data:', len(data), 'bytes:', repr(data[:100])[:40]
# Run the test when run as script
if __name__ == '__main__':