parameters: (self)
return_statement: return _calculate_ratio(matches, len(self.a) + len(self.b))
docstring: Return a measure of the sequences' similarity (float in [0,1]).
  
          Where T is the total number of elements in both sequences, and
          M is the number of matches, this is 2.0*M / T.
          Note that this is 1 if the sequences are identical, and 0 if
          they have nothing in common.
  
          .ratio() is expensive to compute if you haven't already computed
          .get_matching_blocks() or .get_opcodes(), in which case you may
          want to try .quick_ratio() or .real_quick_ratio() first to get an
          upper bound.
  
          >>> s = SequenceMatcher(None, "abcd", "bcde")
          >>> s.ratio()
          0.75
          >>> s.quick_ratio()
          0.75
          >>> s.real_quick_ratio()
          1.0
docstring_summary: Return a measure of the sequences' similarity (float in [0,1]).
docstring_tokens: Return a measure of the sequences similarity ( float in [ 0 1 ] ) .
function: def ratio(self):
          """Return a measure of the sequences' similarity (float in [0,1]).
  
          Where T is the total number of elements in both sequences, and
          M is the number of matches, this is 2.0*M / T.
          Note that this is 1 if the sequences are identical, and 0 if
          they have nothing in common.
  
          .ratio() is expensive to compute if you haven't already computed
          .get_matching_blocks() or .get_opcodes(), in which case you may
          want to try .quick_ratio() or .real_quick_ratio() first to get an
          upper bound.
  
          >>> s = SequenceMatcher(None, "abcd", "bcde")
          >>> s.ratio()
          0.75
          >>> s.quick_ratio()
          0.75
          >>> s.real_quick_ratio()
          1.0
          """
  
          matches = sum(triple[-1] for triple in self.get_matching_blocks())
          return _calculate_ratio(matches, len(self.a) + len(self.b))
function_tokens: def ratio ( self ) : matches = sum ( triple [ - 1 ] for triple in self . get_matching_blocks ( ) ) return _calculate_ratio ( matches , len ( self . a ) + len ( self . b ) )