def _validate_list(key, value):
 for (ind, element) in enumerate(value):
  if (not (isinstance(element, basestring) or isinstance(element, datetime.date) or isinstance(element, datetime.datetime) or isinstance(element, numbers.Number))):
   raise ValueError(('All values of a multi-valued field must be numbers, strings, date or datetime instances, The %dth value for field %s has type %s.' % (ind, key, type(element))))

def _validate_list ( key , value ) : for ( ind , element ) in enumerate ( value ) : if ( not ( isinstance ( element , basestring ) or isinstance ( element , datetime . date ) or isinstance ( element , datetime . datetime ) or isinstance ( element , numbers . Number ) ) ) : raise ValueError ( ( 'All values of a multi-valued field must be numbers, strings, date or datetime instances, The %dth value for field %s has type %s.' % ( ind , key , type ( element ) ) ) )
validates a list to be included as document fields .