summaryrefslogtreecommitdiffstats
path: root/Lib/difflib.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/difflib.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/difflib.py')
-rw-r--r--Lib/difflib.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/difflib.py b/Lib/difflib.py
index 699845c..c074b19 100644
--- a/Lib/difflib.py
+++ b/Lib/difflib.py
@@ -689,9 +689,9 @@ def get_close_matches(word, possibilities, n=3, cutoff=0.6):
"""
if not n > 0:
- raise ValueError("n must be > 0: " + `n`)
+ raise ValueError("n must be > 0: %r" % (n,))
if not 0.0 <= cutoff <= 1.0:
- raise ValueError("cutoff must be in [0.0, 1.0]: " + `cutoff`)
+ raise ValueError("cutoff must be in [0.0, 1.0]: %r" % (cutoff,))
result = []
s = SequenceMatcher()
s.set_seq2(word)
@@ -876,7 +876,7 @@ class Differ:
elif tag == 'equal':
g = self._dump(' ', a, alo, ahi)
else:
- raise ValueError, 'unknown tag ' + `tag`
+ raise ValueError, 'unknown tag %r' % (tag,)
for line in g:
yield line
@@ -988,7 +988,7 @@ class Differ:
atags += ' ' * la
btags += ' ' * lb
else:
- raise ValueError, 'unknown tag ' + `tag`
+ raise ValueError, 'unknown tag %r' % (tag,)
for line in self._qformat(aelt, belt, atags, btags):
yield line
else: