[issue21635] difflib.SequenceMatcher stores matching blocks as tuples, not Match named tuples

drevicko report at bugs.python.org
Mon Jun 2 12:03:56 CEST 2014


New submission from drevicko:

difflib.SequenceMatcher.get_matching_blocks() last lines:


        non_adjacent.append( (la, lb, 0) )
        self.matching_blocks = non_adjacent
        return map(Match._make, self.matching_blocks)

should be something like:

        non_adjacent.append( (la, lb, 0) )
        self.matching_blocks = map(Match._make, non_adjacent)
        return self.matching_blocks

----------
components: Library (Lib)
messages: 219565
nosy: drevicko
priority: normal
severity: normal
status: open
title: difflib.SequenceMatcher stores matching blocks as tuples, not Match named tuples
type: behavior
versions: Python 2.7

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


More information about the Python-bugs-list mailing list