#NEWLINE# def _parse_generic( * args ) : #NEWLINE# #INDENT# def f( value , render_device ) : #NEWLINE# #INDENT# if ( ( type ( value ) in args ) or ( ( type ( value ) in ( Ident , Number ) ) and ( value in args ) ) ) : #NEWLINE# #INDENT# return value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValidationException ( ) #NEWLINE# #UNINDENT# #UNINDENT# return f