[issue30920] Sequence Matcher from diff lib is not implementing longest common substring problem correctly

Tim Peters report at bugs.python.org
Thu Jul 13 12:02:55 EDT 2017


Tim Peters added the comment:

This is an unfortunate consequence of the default "autojunk" feature.  You can turn that off by passing `autojunk=False`, like so:

match = SequenceMatcher(None, string1, string2, autojunk=False)...
                                              ^^^^^^^^^^^^^^^^

Then it returns a match of size 534.

----------
nosy: +tim.peters

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30920>
_______________________________________


More information about the Python-bugs-list mailing list