Commit f2c4ba1b authored by Raymond Hettinger's avatar Raymond Hettinger

Replace constant tuple with constant set.

parent f77e3733
...@@ -1267,7 +1267,7 @@ def context_diff(a, b, fromfile='', tofile='', ...@@ -1267,7 +1267,7 @@ def context_diff(a, b, fromfile='', tofile='',
yield '*** %d,%d ****%s' % (group[0][1]+1, group[-1][2], lineterm) yield '*** %d,%d ****%s' % (group[0][1]+1, group[-1][2], lineterm)
else: else:
yield '*** %d ****%s' % (group[-1][2], lineterm) yield '*** %d ****%s' % (group[-1][2], lineterm)
visiblechanges = [e for e in group if e[0] in ('replace', 'delete')] visiblechanges = [e for e in group if e[0] in {'replace', 'delete'}]
if visiblechanges: if visiblechanges:
for tag, i1, i2, _, _ in group: for tag, i1, i2, _, _ in group:
if tag != 'insert': if tag != 'insert':
...@@ -1278,7 +1278,7 @@ def context_diff(a, b, fromfile='', tofile='', ...@@ -1278,7 +1278,7 @@ def context_diff(a, b, fromfile='', tofile='',
yield '--- %d,%d ----%s' % (group[0][3]+1, group[-1][4], lineterm) yield '--- %d,%d ----%s' % (group[0][3]+1, group[-1][4], lineterm)
else: else:
yield '--- %d ----%s' % (group[-1][4], lineterm) yield '--- %d ----%s' % (group[-1][4], lineterm)
visiblechanges = [e for e in group if e[0] in ('replace', 'insert')] visiblechanges = [e for e in group if e[0] in {'replace', 'insert'}]
if visiblechanges: if visiblechanges:
for tag, _, _, j1, j2 in group: for tag, _, _, j1, j2 in group:
if tag != 'delete': if tag != 'delete':
......
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