[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,

[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-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

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