summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2011-04-09 20:00:17 (GMT)
committerRaymond Hettinger <python@rcn.com>2011-04-09 20:00:17 (GMT)
commitc6a726d061023abf0fdf7af41a3602b8f405d303 (patch)
treedcf7dfc67588224280b1cca09ab685fb95afa9de
parenta56328680d00619b486909c604fee387a81ffc77 (diff)
downloadcpython-c6a726d061023abf0fdf7af41a3602b8f405d303.zip
cpython-c6a726d061023abf0fdf7af41a3602b8f405d303.tar.gz
cpython-c6a726d061023abf0fdf7af41a3602b8f405d303.tar.bz2
Replace constant tuple with constant set.
-rw-r--r--Lib/difflib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/difflib.py b/Lib/difflib.py
index 003e72e..27c73d4 100644
--- a/Lib/difflib.py
+++ b/Lib/difflib.py
@@ -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':