#NEWLINE# def safe_str( s , errors = 'replace' ) : #NEWLINE# #INDENT# s = bytes_to_str ( s ) #NEWLINE# if ( not isinstance ( s , ( text_t , bytes ) ) ) : #NEWLINE# #INDENT# return safe_repr ( s , errors ) #NEWLINE# #UNINDENT# return _safe_str ( errors , errors )