summaryrefslogtreecommitdiffstats
path: root/Lib/difflib.py
diff options
context:
space:
mode:
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: