parameters: (self, to_convert, directive)
return_statement: return '%s)' % regex
docstring: Convert a list to a regex string for matching a directive.
  
          Want possible matching values to be from longest to shortest.  This
          prevents the possibility of a match occuring for a value that also
          a substring of a larger value that should have matched (e.g., 'abc'
          matching when 'abcdef' should have been the match).
docstring_summary: Convert a list to a regex string for matching a directive.
docstring_tokens: Convert a list to a regex string for matching a directive .
function: def __seqToRE(self, to_convert, directive):
          """Convert a list to a regex string for matching a directive.
  
          Want possible matching values to be from longest to shortest.  This
          prevents the possibility of a match occuring for a value that also
          a substring of a larger value that should have matched (e.g., 'abc'
          matching when 'abcdef' should have been the match).
  
          """
          to_convert = sorted(to_convert, key=len, reverse=True)
          for value in to_convert:
              if value != '':
                  break
          else:
              return ''
          regex = '|'.join(re_escape(stuff) for stuff in to_convert)
          regex = '(?P<%s>%s' % (directive, regex)
          return '%s)' % regex
function_tokens: def __seqToRE ( self , to_convert , directive ) : to_convert = sorted ( to_convert , key = len , reverse = True ) for value in to_convert : if value != '' : break else : return '' regex = '|' . join ( re_escape ( stuff ) for stuff in to_convert ) regex = '(?P<%s>%s' % ( directive , regex ) return '%s)' % regex