Message221153
> What behavior both looks wrong and gets improved by the change?
The incorrect behavior is that matching_blocks is incorrectly cached so that calls to get_matching_blocks() returns an answer without the named tuple (in contravention of the documented behavior):
>>> s = SequenceMatcher(None, "abxcd", "abcd")
>>> s.get_matching_blocks()
[Match(a=0, b=0, size=2), Match(a=3, b=2, size=2), Match(a=5, b=4, size=0)]
>>> s.get_matching_blocks()
[(0, 0, 2), (3, 2, 2), (5, 4, 0)]
>>> s.get_matching_blocks()
[(0, 0, 2), (3, 2, 2), (5, 4, 0)] |
|
Date |
User |
Action |
Args |
2014-06-21 04:43:10 | rhettinger | set | recipients:
+ rhettinger, tim.peters, terry.reedy, drevicko |
2014-06-21 04:43:09 | rhettinger | set | messageid: <1403325789.99.0.85033711467.issue21635@psf.upfronthosting.co.za> |
2014-06-21 04:43:09 | rhettinger | link | issue21635 messages |
2014-06-21 04:43:09 | rhettinger | create | |
|