[issue4622] SequenceMatcher bug with long sequences

Gabriel Genellina report at bugs.python.org
Wed Dec 10 20:38:28 CET 2008


Gabriel Genellina <gagsl-py2 at yahoo.com.ar> added the comment:

Python 2.3.4 and later have this bug. But release 2.1.3 doesn't:

Python 2.1.3 (#35, Apr  8 2002, 17:47:50) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> import difflib
>>> difflib.SequenceMatcher(None, [4] + [5] * 500, [5] * 500).ratio()
0.99900099900099903
>>> difflib.SequenceMatcher(None, [4] + [5] * 200, [5] * 200).ratio()
0.99750623441396513
>>> difflib.SequenceMatcher(None, [4] + [5] * 100, [5] * 100).ratio()
0.99502487562189057

I don't have any 2.2 release to test right now.

----------
nosy: +gagenellina

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


More information about the Python-bugs-list mailing list