#NEWLINE# def _compile_pattern( pat ) : #NEWLINE# #INDENT# if isinstance ( pat , bytes ) : #NEWLINE# #INDENT# pat_str = pat . decode ( 'ISO-8859-1' ) #NEWLINE# res_str = translate ( pat_str ) #NEWLINE# res = res_str . encode ( 'ISO-8859-1' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# res = translate ( pat ) #NEWLINE# #UNINDENT# return re . compile ( res ) . match