SequenceMatcher.get_matching_blocks(): This now guarantees that
adjacent triples in the result list describe non-adjacent matching
blocks. That's _nice_ to have, and Guido said he wanted it.
Not a bugfix candidate: Guido or not ;-), this changes visible
endcase semantics (note that some tests had to change), and
nothing about this was documented before. Since it was working
as designed, and behavior was consistent with the docs, it wasn't
"a bug".
diff --git a/Misc/NEWS b/Misc/NEWS
index d7dfb8f..a0d7182 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -156,6 +156,12 @@
Library
-------
+- ``difflib``'s ``SequenceMatcher.get_matching_blocks()`` was changed to
+ guarantee that adjacent triples in the return list always describe
+ non-adjacent blocks. Previously, a pair of matching blocks could end
+ up being described by multiple adjacent triples that formed a partition
+ of the matching pair.
+
- Bug #1498146: fix optparse to handle Unicode strings in option help,
description, and epilog.