Commit 2d41650b authored by Guido van Rossum's avatar Guido van Rossum

Get rid of Python 2.1 += syntax.

parent 373b6fd7
...@@ -490,15 +490,15 @@ def fancy_replace(a, alo, ahi, b, blo, bhi): ...@@ -490,15 +490,15 @@ def fancy_replace(a, alo, ahi, b, blo, bhi):
for tag, ai1, ai2, bj1, bj2 in cruncher.get_opcodes(): for tag, ai1, ai2, bj1, bj2 in cruncher.get_opcodes():
la, lb = ai2 - ai1, bj2 - bj1 la, lb = ai2 - ai1, bj2 - bj1
if tag == 'replace': if tag == 'replace':
atags += '^' * la atags = atags + '^' * la
btags += '^' * lb btags = btags + '^' * lb
elif tag == 'delete': elif tag == 'delete':
atags += '-' * la atags = atags + '-' * la
elif tag == 'insert': elif tag == 'insert':
btags += '+' * lb btags = btags + '+' * lb
elif tag == 'equal': elif tag == 'equal':
atags += ' ' * la atags = atags + ' ' * la
btags += ' ' * lb btags = btags + ' ' * lb
else: else:
raise ValueError, 'unknown tag ' + `tag` raise ValueError, 'unknown tag ' + `tag`
printq(aelt, belt, atags, btags) printq(aelt, belt, atags, btags)
...@@ -535,7 +535,7 @@ def printq(aline, bline, atags, btags): ...@@ -535,7 +535,7 @@ def printq(aline, bline, atags, btags):
def count_leading(line, ch): def count_leading(line, ch):
i, n = 0, len(line) i, n = 0, len(line)
while i < n and line[i] == ch: while i < n and line[i] == ch:
i += 1 i = i + 1
return i return i
def fail(msg): def fail(msg):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment