#NEWLINE# def convert( self , value , view ) : #NEWLINE# #INDENT# if isinstance ( value , bytes ) : #NEWLINE# #INDENT# value = value . decode ( 'utf8' , 'ignore' ) #NEWLINE# #UNINDENT# if isinstance ( value , STRING ) : #NEWLINE# #INDENT# if self . split : #NEWLINE# #INDENT# return value . split ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return [ value ] #NEWLINE# #UNINDENT# #UNINDENT# try : #NEWLINE# #INDENT# value = list ( value ) #NEWLINE# #UNINDENT# except TypeError : #NEWLINE# #INDENT# self . fail ( 'must be a whitespace-separated string or a list' , view , True ) #NEWLINE# #UNINDENT# def convert( x ) : #NEWLINE# #INDENT# if isinstance ( x , STRING ) : #NEWLINE# #INDENT# return x #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( x , bytes ) : #NEWLINE# #INDENT# return x . decode ( 'utf8' , 'ignore' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . fail ( 'must be a list of strings' , view , True ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return list ( map ( value , value ) )