def patmatch(name, pat):
 if (pat not in _pat_cache):
  _pat_cache[pat] = re.compile(_translate_pattern(pat))
 return _pat_cache[pat].match(name)

def patmatch ( name , pat ) : if ( pat not in _pat_cache ) : _pat_cache [ pat ] = re . compile ( _translate_pattern ( pat ) ) return _pat_cache [ pat ] . match ( name )
return if name matches pat .