This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author offby1
Recipients Claudiu.Popa, offby1, rhettinger, terry.reedy, tim.peters
Date 2014-04-15.15:32:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1397575921.15.0.700634863446.issue20752@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-04-15 15:32:01offby1setrecipients: + offby1, tim.peters, rhettinger, terry.reedy, Claudiu.Popa
2014-04-15 15:32:01offby1setmessageid: <1397575921.15.0.700634863446.issue20752@psf.upfronthosting.co.za>
2014-04-15 15:32:01offby1linkissue20752 messages
2014-04-15 15:32:00offby1create