[Python-checkins] r83314 - python/branches/release26-maint/Doc/library/difflib.rst

georg.brandl python-checkins at python.org
Sat Jul 31 10:00:13 CEST 2010


Author: georg.brandl
Date: Sat Jul 31 10:00:13 2010
New Revision: 83314

Log:
#2986: document SequenceMatcher heuristic.

Modified:
   python/branches/release26-maint/Doc/library/difflib.rst

Modified: python/branches/release26-maint/Doc/library/difflib.rst
==============================================================================
--- python/branches/release26-maint/Doc/library/difflib.rst	(original)
+++ python/branches/release26-maint/Doc/library/difflib.rst	Sat Jul 31 10:00:13 2010
@@ -37,6 +37,11 @@
    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
 


More information about the Python-checkins mailing list