[Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

Antoine Pitrou solipsis at pitrou.net
Wed Jul 7 13:08:48 CEST 2010


On Tue, 06 Jul 2010 19:18:09 -0400
Terry Reedy <tjreedy at udel.edu> wrote:
> 
> Version A: Modify the heuristic to only eliminate common items when 
> there are more than, say, 100 items (when len(b2j)> 100 where b2j is 
> first calculated without popularity deletions).
[...]
> 
> Version B: add a parameter to .__init__ to make the heuristic optional. 
[...]
> 
> Version C: A more radical alternative would be to make one or more of 
> the tuning parameters user settable, with one setting turning it off.

Version B would have my favour (but please make the default be True). 
Version A can lead to regressions (including performance regressions
such as described by Tim), and version C looks far more complicated to
use.

Regards

Antoine.




More information about the Python-Dev mailing list