@@ -570,8 +570,8 @@ The :class:`SequenceMatcher` class has this constructor:
570570
571571The three methods that return the ratio of matching to total characters can give
572572different results due to differing levels of approximation, although
573- :meth: `quick_ratio ` and :meth: `real_quick_ratio ` are always at least as large as
574- :meth: `ratio `:
573+ :meth: `~SequenceMatcher. quick_ratio ` and :meth: `~SequenceMatcher. real_quick_ratio `
574+ are always at least as large as :meth: `~SequenceMatcher. ratio `:
575575
576576 >>> s = SequenceMatcher(None , " abcd" , " bcde" )
577577 >>> s.ratio()
@@ -593,28 +593,28 @@ This example compares two strings, considering blanks to be "junk":
593593 ... " private Thread currentThread;" ,
594594 ... " private volatile Thread currentThread;" )
595595
596- :meth: `ratio ` returns a float in [0, 1], measuring the similarity of the
597- sequences. As a rule of thumb, a :meth: `ratio ` value over 0.6 means the
596+ :meth: `~SequenceMatcher. ratio ` returns a float in [0, 1], measuring the similarity of the
597+ sequences. As a rule of thumb, a :meth: `~SequenceMatcher. ratio ` value over 0.6 means the
598598sequences are close matches:
599599
600600 >>> print (round (s.ratio(), 3 ))
601601 0.866
602602
603603If you're only interested in where the sequences match,
604- :meth: `get_matching_blocks ` is handy:
604+ :meth: `~SequenceMatcher. get_matching_blocks ` is handy:
605605
606606 >>> for block in s.get_matching_blocks():
607607 ... print (" a[%d ] and b[%d ] match for %d elements" % block)
608608 a[0] and b[0] match for 8 elements
609609 a[8] and b[17] match for 21 elements
610610 a[29] and b[38] match for 0 elements
611611
612- Note that the last tuple returned by :meth: `get_matching_blocks ` is always a
613- dummy, ``(len(a), len(b), 0) ``, and this is the only case in which the last
612+ Note that the last tuple returned by :meth: `~SequenceMatcher. get_matching_blocks `
613+ is always a dummy, ``(len(a), len(b), 0) ``, and this is the only case in which the last
614614tuple element (number of elements matched) is ``0 ``.
615615
616616If you want to know how to change the first sequence into the second, use
617- :meth: `get_opcodes `:
617+ :meth: `~SequenceMatcher. get_opcodes `:
618618
619619 >>> for opcode in s.get_opcodes():
620620 ... print (" %6s a[%d :%d ] b[%d :%d ]" % opcode)
@@ -689,7 +689,7 @@ Differ Example
689689
690690This example compares two texts. First we set up the texts, sequences of
691691individual single-line strings ending with newlines (such sequences can also be
692- obtained from the :meth: `~io.BaseIO .readlines ` method of file-like objects):
692+ obtained from the :meth: `~io.IOBase .readlines ` method of file-like objects):
693693
694694 >>> text1 = ''' 1. Beautiful is better than ugly.
695695 ... 2 . Explicit is better than implicit.
0 commit comments