[issue4622] SequenceMatcher bug with long sequences
Terry J. Reedy tjre...@udel.edu added the comment: This appears to be one of at least three duplicate issues: #1528074, #2986, and #4622. I am closing two, leaving 2986 open, and merging the nearly disjoint nosy lists. (If no longer interested, you can delete yourself from 2986.) #1711800 appears to be slightly different (if not, it could be closed also.) Whether or not a new feature is ever added (earliest, now, 3.2), it appears that the docs need improvement to at least explain the current behavior. If someone who understands the issue could open a separate doc issue (for 2.6/7/3.1/2) with a suggested addition, that would be great. -- nosy: +tjreedy resolution: - duplicate status: open - closed superseder: - difflib.SequenceMatcher not matching long sequences ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4622 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4622] SequenceMatcher bug with long sequences
New submission from eliben [EMAIL PROTECTED]: Here's a reproduction of the error: Python 2.5.2 (r252:60911, Oct 20 2008, 09:11:31) [GCC 3.4.6 20060404 (Red Hat 3.4.6-10)] on linux2 Type help, copyright, credits or license for more information. import difflib difflib.SequenceMatcher(None, [4] + [5] * 200, [5] * 200).ratio() 0.0 ratio() should be returning close to 1.0 here, not 0. This is only a problem for sequences longer than 200. The analogous run for 100: difflib.SequenceMatcher(None, [4] + [5] * 100, [5] * 100).ratio() 0.99502487562189057 I've managed to reproduce it on Linux, Windows (AS 2.5.2) and Try Python (http://try-python.mired.org/) -- components: Library (Lib) messages: 77559 nosy: eliben severity: normal status: open title: SequenceMatcher bug with long sequences versions: Python 2.5 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4622 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4622] SequenceMatcher bug with long sequences
David W. Lambert [EMAIL PROTECTED] added the comment: Python 3.0rc1+ similar. -- nosy: +LambertDW versions: +Python 3.0 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4622 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4622] SequenceMatcher bug with long sequences
Gabriel Genellina [EMAIL PROTECTED] 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 [EMAIL PROTECTED] http://bugs.python.org/issue4622 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4622] SequenceMatcher bug with long sequences
Gabriel Genellina [EMAIL PROTECTED] added the comment: #2986 may be a duplicate of this; #1528074 is relevant too. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4622 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com