Message216308
As a historical record, it should be noted that this is driven by an actual use case: I was experimenting with using Bazaar's patience diff implementation, and I saw that in order for them to use a custom sequence matcher, they had to essentially copy-paste and modify the stdlib diff methods in order to inject their own sequence matchers. That struck me as a bad thing, and that's pretty much what led to this.
I welcome a discussion of the API itself; there's definitely a bit of an odd challenge in describing the usage of the matcher variants when both are used (in line_matcher and char_matcher roles).
A possible approach would be to consider matcher factories to take _just_ a junk function, nothing else, and use the SequenceMatcher API's set_seqs method to actually provide the sequences in all cases. This fits the character use case, which reuses the matcher, and the line use case which does not. |
|
Date |
User |
Action |
Args |
2014-04-15 15:32:01 | offby1 | set | recipients:
+ offby1, tim.peters, rhettinger, terry.reedy, Claudiu.Popa |
2014-04-15 15:32:01 | offby1 | set | messageid: <1397575921.15.0.700634863446.issue20752@psf.upfronthosting.co.za> |
2014-04-15 15:32:01 | offby1 | link | issue20752 messages |
2014-04-15 15:32:00 | offby1 | create | |
|