Commit c6a726d0 authored by Raymond Hettinger's avatar Raymond Hettinger

Replace constant tuple with constant set.

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