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 terry.reedy
Recipients docs@python, hubertbdlb, terry.reedy, tim.peters
Date 2021-03-13.07:27:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615620443.48.0.742325053575.issue43473@roundup.psfhosted.org>
In-reply-to
Content
Currently return tuple (i, j, n), means that a[i:i+n] == b[j:j+n], where both matching blocks are the same length.
https://docs.python.org/3/library/difflib.html#difflib.SequenceMatcher.get_matching_blocks

This would not be the case if a has an ignored space and b does not. Changing the current definition would break existing code and would require quadruples to return two different lengths.  This would require either a new parameter for the function to select the behavior or a new function with a new name.

Either option would require justification by actual use cases.  I cannot see what they might be.  An way to have junk chars completely ignored is to strip them from both strings before calling SequenceMatcher.
History
Date User Action Args
2021-03-13 07:27:23terry.reedysetrecipients: + terry.reedy, tim.peters, docs@python, hubertbdlb
2021-03-13 07:27:23terry.reedysetmessageid: <1615620443.48.0.742325053575.issue43473@roundup.psfhosted.org>
2021-03-13 07:27:23terry.reedylinkissue43473 messages
2021-03-13 07:27:23terry.reedycreate