#NEWLINE# def _normalize_search_value( self , value ) : #NEWLINE# #INDENT# if ( isinstance ( value , str ) or isinstance ( value , collections . Callable ) or hasattr ( value , 'match' ) or isinstance ( value , bool ) or ( value is None ) ) : #NEWLINE# #INDENT# return value #NEWLINE# #UNINDENT# if isinstance ( value , bytes ) : #NEWLINE# #INDENT# return value . decode ( 'utf8' ) #NEWLINE# #UNINDENT# if hasattr ( value , '__iter__' ) : #NEWLINE# #INDENT# new_value = [ ] #NEWLINE# for v in value : #NEWLINE# #INDENT# if ( hasattr ( v , '__iter__' ) and ( not isinstance ( v , bytes ) ) and ( not isinstance ( v , str ) ) ) : #NEWLINE# #INDENT# new_value . append ( v ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# new_value . append ( self . _normalize_search_value ( v ) ) #NEWLINE# #UNINDENT# #UNINDENT# return new_value #NEWLINE# #UNINDENT# return str ( str ( value ) )