def _validate(self, value):
    if not isinstance(value, (int, long, float)):
      raise datastore_errors.BadValueError('Expected float, got %r' %
                                           (value,))
    return float(value)
dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py/FloatProperty._validate/original