#NEWLINE# def errorInvalid( self , what , given = None , s = '' , repr = True , **kwargs ) : #NEWLINE# #INDENT# if ( given is not None ) : #NEWLINE# #INDENT# if repr : #NEWLINE# #INDENT# given = _repr ( given ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# given = ( '"%s"' % given ) #NEWLINE# #UNINDENT# v = ( _ ( '%s is not a valid %s.' ) % ( given , what ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# v = ( _ ( "That's not a valid %s." ) % what ) #NEWLINE# #UNINDENT# if ( 'Raise' not in kwargs ) : #NEWLINE# #INDENT# kwargs [ 'Raise' ] = True #NEWLINE# #UNINDENT# if s : #NEWLINE# #INDENT# v += ( ' ' + s ) #NEWLINE# #UNINDENT# return self . _error ( given , ** kwargs )