Ensuring symmetry in difflib.SequenceMatcher

Wolfgang Rohdewald wolfgang at rohdewald.de
Wed Nov 24 03:49:50 EST 2010


On Mittwoch 24 November 2010, John Yeung wrote:
>  Are there any
> simple adjustments that can be made without sacrificing (too
> much) performance?

>>> difflib.SequenceMatcher(None,*sorted(('BYRD','BRADY'))).ratio()
0.66666666666666663

-- 
Wolfgang



More information about the Python-list mailing list