diff options
Diffstat (limited to 'Lib/difflib.py')
-rw-r--r-- | Lib/difflib.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/difflib.py b/Lib/difflib.py index 529c786..e82c703 100644 --- a/Lib/difflib.py +++ b/Lib/difflib.py @@ -572,6 +572,8 @@ class SequenceMatcher: """ codes = self.get_opcodes() + if not codes: + codes = [("equal", 0, 1, 0, 1)] # Fixup leading and trailing groups if they show no changes. if codes[0][0] == 'equal': tag, i1, i2, j1, j2 = codes[0] |