def check_variable_type(allowed_type_funcs):
 def enumerated_type_check(var_name, val):
  for func in allowed_type_funcs:
   if (not func(var_name, val)):
    return None
  return (_('%s is not an allowed_type') % (var_name,))
 return enumerated_type_check

def check_variable_type ( allowed_type_funcs ) : def enumerated_type_check ( var_name , val ) : for func in allowed_type_funcs : if ( not func ( var_name , val ) ) : return None return ( _ ( '%s is not an allowed_type' ) % ( var_name , ) ) return enumerated_type_check
use this validator if an argument is of a variable type .