[issue12384] difflib.SequenceMatcher and Match: code and doc bugs

2021-12-03 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 ___ Python tracker ___

[issue12384] difflib.SequenceMatcher and Match: code and doc bugs

2014-12-31 Thread A.M. Kuchling
Changes by A.M. Kuchling : -- nosy: -akuchling ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue12384] difflib.SequenceMatcher and Match: code and doc bugs

2014-03-20 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue12384] difflib.SequenceMatcher and Match: code and doc bugs

2014-03-18 Thread A.M. Kuchling
A.M. Kuchling added the comment: Here's a patch fixing the first return in get_matching_blocks() and updating the docs. I didn't change get_matching_blocks() to return a list again, assuming that we didn't want to do that. (Raymond doesn't say to do so, at least.) -- nosy: +akuchling

[issue12384] difflib.SequenceMatcher and Match: code and doc bugs

2013-03-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: More doc bugs: unified_diff and context_diff say 'lists of strings' when 'sequences of strings' is correct. Docstrings do say 'sequences'. In 3.x, SequenceMatcher.get_matching_blocks return a map objects rather than a list. In spite of my original post, the it

[issue12384] difflib.SequenceMatcher and Match: code and doc bugs

2011-06-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Go head an patch the first self.matching_blocks to also return a named tuple. Also, correct any doctests or examples using these. The docs could also mention that list of namedtuples with fields a, b, and size is returned by get_matching_blocks(). --

[issue12384] difflib.SequenceMatcher and Match: code and doc bugs

2011-06-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll take a look at this when I get a chance (est. two weeks). -- ___ Python tracker ___ ___ Pyt

[issue12384] difflib.SequenceMatcher and Match: code and doc bugs

2011-06-21 Thread Terry J. Reedy
New submission from Terry J. Reedy : The basic problem: in 2.6, a namedtuple was introduced to difflib from collections import namedtuple as _namedtuple Match = _namedtuple('Match', 'a b size') and used for the return values of SeqeunceMatcher.get_longest_match and .get_matching_blocks. Code,