parameters: (pat, ignore_case=True)
return_statement: return re.compile(res, flags=flags).match
docstring: Translate and compile a glob pattern to a regular expression matcher.
docstring_summary: Translate and compile a glob pattern to a regular expression matcher.
docstring_tokens: Translate and compile a glob pattern to a regular expression matcher .
function: def _compile_pattern(pat, ignore_case=True):
      """Translate and compile a glob pattern to a regular expression matcher."""
      if isinstance(pat, bytes):
          pat_str = pat.decode('ISO-8859-1')
          res_str = _translate_glob(pat_str)
          res = res_str.encode('ISO-8859-1')
      else:
          res = _translate_glob(pat)
      flags = re.IGNORECASE if ignore_case else 0
      return re.compile(res, flags=flags).match
function_tokens: def _compile_pattern ( pat , ignore_case = True ) : if isinstance ( pat , bytes ) : pat_str = pat . decode ( 'ISO-8859-1' ) res_str = _translate_glob ( pat_str ) res = res_str . encode ( 'ISO-8859-1' ) else : res = _translate_glob ( pat ) flags = re . IGNORECASE if ignore_case else 0 return re . compile ( res , flags = flags ) . match