def validate(self, value):
    value = super(_CoercingProperty, self).validate(value)
    if value is not None and not isinstance(value, self.data_type):
      value = self.data_type(value)
    return value
Coerce values (except None) to self.data_type.
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/ext/db/__init__.py/_CoercingProperty.validate