From: Georg Brandl Date: Sat, 31 Jul 2010 08:00:13 +0000 (+0000) Subject: #2986: document SequenceMatcher heuristic. X-Git-Tag: v2.6.6rc1~100 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6cb047b21c841450c1178720a1af5bebbbdbf21a;p=thirdparty%2FPython%2Fcpython.git #2986: document SequenceMatcher heuristic. --- diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index d749e1458295..9cd76e36419c 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -37,6 +37,11 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. complicated way on how many elements the sequences have in common; best case time is linear. + **Heuristic:** To speed-up matching, items that appear more than 1% of the + time in sequences of at least 200 items are treated as junk. This has the + unfortunate side-effect of giving bad results for sequences constructed from + a small set of items. An option to turn off the heuristic will be added to a + future version. .. class:: Differ