diff options
Diffstat (limited to 'Doc/library/difflib.rst')
-rw-r--r-- | Doc/library/difflib.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index 6743bdc1d8..f044cb2d6e 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -457,14 +457,15 @@ The :class:`SequenceMatcher` class has this constructor: .. method:: get_matching_blocks() - Return list of triples describing matching subsequences. Each triple is of - the form ``(i, j, n)``, and means that ``a[i:i+n] == b[j:j+n]``. The + Return list of triples describing non-overlapping matching subsequences. + Each triple is of the form ``(i, j, n)``, + and means that ``a[i:i+n] == b[j:j+n]``. The triples are monotonically increasing in *i* and *j*. The last triple is a dummy, and has the value ``(len(a), len(b), 0)``. It is the only triple with ``n == 0``. If ``(i, j, n)`` and ``(i', j', n')`` are adjacent triples in the list, and the second is not the last triple in - the list, then ``i+n != i'`` or ``j+n != j'``; in other words, adjacent + the list, then ``i+n < i'`` or ``j+n < j'``; in other words, adjacent triples always describe non-adjacent equal blocks. .. XXX Explain why a dummy is used! |