Tim Peters <t...@python.org> added the comment:

I don't object to spelling it out more, and your (Terry's) suggestions are 
fine.  On the other hand, this module has been around for a loooong time now, 
and this is the first instance I've seen of someone surprised that it doesn't 
produce overlapping matches - it's obvious from "The same idea is then applied 
recursively to the pieces of the sequences to the left and to the right of the 
matching subsequence" that a matching subsequence is wholly eliminated from 
further consideration.

At some point of ever-more tedious elaboration, the docs risk missing the 
forest for the trees.  I don't think _these_ docs are quite there yet - 
although the docs for `find_longest_match()` are.  Speaking of which, that 
method _could_ be used to find overlapping matches, one at a time, by passing 
appropriate slice indices.

Which can be horridly inefficient; e.g., find all overlapping matches between

'A' * 100

and

'A' * 150

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35079>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to