def validate_list_contents(self, value):
    if self.item_type in (int, long):
      item_type = (int, long)
    else:
      item_type = self.item_type

    for item in value:
      if not isinstance(item, item_type):
        if item_type == (int, long):
          raise BadValueError('Items in the %s list must all be integers.' %
                              self.name)
        else:
          raise BadValueError(
              'Items in the %s list must all be %s instances' %
              (self.name, self.item_type.__name__))
    return value
Return colorspace primaries
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/db/__init__.py/ListProperty.validate_list_contents--crossover with--dataset/ETHPy150Open mikrosimage/ColorPipe-tools/utils/colorspaces.py/AbstractColorspace.get_red_primaries