(self, isjunk=None, a='', b='', autojunk=True)
Construct a SequenceMatcher.

        Optional arg isjunk is None (the default), or a one-argument
        function that takes a sequence element and returns true iff the
        element is junk.  None is equivalent to passing "lambda x: 0", i.e.
        no elements are considered to be junk.  For example, pass
            lambda x: x in " \\t"
        if you're comparing lines as sequences of characters, and don't
        want to synch up on blanks or hard tabs.

        Optional arg a is the first of two sequences to be compared.  By
        default, an empty string.  The elements of a must be hashable.  See
        also .set_seqs() and .set_seq1().

        Optional arg b is the second of two sequences to be compared.  By
        default, an empty string.  The elements of b must be hashable. See
        also .set_seqs() and .set_seq2().

        Optional arg autojunk should be set to False to disable the
        "automatic junk heuristic" that treats popular elements as junk
        (see module documentation for more information).
Construct a SequenceMatcher.
Construct a SequenceMatcher .
def __init__(self, isjunk=None, a='', b='', autojunk=True):
        """Construct a SequenceMatcher.

        Optional arg isjunk is None (the default), or a one-argument
        function that takes a sequence element and returns true iff the
        element is junk.  None is equivalent to passing "lambda x: 0", i.e.
        no elements are considered to be junk.  For example, pass
            lambda x: x in " \\t"
        if you're comparing lines as sequences of characters, and don't
        want to synch up on blanks or hard tabs.

        Optional arg a is the first of two sequences to be compared.  By
        default, an empty string.  The elements of a must be hashable.  See
        also .set_seqs() and .set_seq1().

        Optional arg b is the second of two sequences to be compared.  By
        default, an empty string.  The elements of b must be hashable. See
        also .set_seqs() and .set_seq2().

        Optional arg autojunk should be set to False to disable the
        "automatic junk heuristic" that treats popular elements as junk
        (see module documentation for more information).
        """

        # Members:
        # a
        #      first sequence
        # b
        #      second sequence; differences are computed as "what do
        #      we need to do to 'a' to change it into 'b'?"
        # b2j
        #      for x in b, b2j[x] is a list of the indices (into b)
        #      at which x appears; junk and popular elements do not appear
        # fullbcount
        #      for x in b, fullbcount[x] == the number of times x
        #      appears in b; only materialized if really needed (used
        #      only for computing quick_ratio())
        # matching_blocks
        #      a list of (i, j, k) triples, where a[i:i+k] == b[j:j+k];
        #      ascending & non-overlapping in i and in j; terminated by
        #      a dummy (len(a), len(b), 0) sentinel
        # opcodes
        #      a list of (tag, i1, i2, j1, j2) tuples, where tag is
        #      one of
        #          'replace'   a[i1:i2] should be replaced by b[j1:j2]
        #          'delete'    a[i1:i2] should be deleted
        #          'insert'    b[j1:j2] should be inserted
        #          'equal'     a[i1:i2] == b[j1:j2]
        # isjunk
        #      a user-supplied function taking a sequence element and
        #      returning true iff the element is "junk" -- this has
        #      subtle but helpful effects on the algorithm, which I'll
        #      get around to writing up someday <0.9 wink>.
        #      DON'T USE!  Only __chain_b uses this.  Use "in self.bjunk".
        # bjunk
        #      the items in b for which isjunk is True.
        # bpopular
        #      nonjunk items in b treated as junk by the heuristic (if used).

        self.isjunk = isjunk
        self.a = self.b = None
        self.autojunk = autojunk
        self.set_seqs(a, b)
def __init__ ( self , isjunk = None , a = '' , b = '' , autojunk = True ) : # Members: # a #      first sequence # b #      second sequence; differences are computed as "what do #      we need to do to 'a' to change it into 'b'?" # b2j #      for x in b, b2j[x] is a list of the indices (into b) #      at which x appears; junk and popular elements do not appear # fullbcount #      for x in b, fullbcount[x] == the number of times x #      appears in b; only materialized if really needed (used #      only for computing quick_ratio()) # matching_blocks #      a list of (i, j, k) triples, where a[i:i+k] == b[j:j+k]; #      ascending & non-overlapping in i and in j; terminated by #      a dummy (len(a), len(b), 0) sentinel # opcodes #      a list of (tag, i1, i2, j1, j2) tuples, where tag is #      one of #          'replace'   a[i1:i2] should be replaced by b[j1:j2] #          'delete'    a[i1:i2] should be deleted #          'insert'    b[j1:j2] should be inserted #          'equal'     a[i1:i2] == b[j1:j2] # isjunk #      a user-supplied function taking a sequence element and #      returning true iff the element is "junk" -- this has #      subtle but helpful effects on the algorithm, which I'll #      get around to writing up someday <0.9 wink>. #      DON'T USE!  Only __chain_b uses this.  Use "in self.bjunk". # bjunk #      the items in b for which isjunk is True. # bpopular #      nonjunk items in b treated as junk by the heuristic (if used). self . isjunk = isjunk self . a = self . b = None self . autojunk = autojunk self . set_seqs ( a , b )