

def _validate(self, value):
    if (not isinstance(value, bool)):
        raise datastore_errors.BadValueError(('Expected bool, got %r' % (value,)))
    return value

dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py BooleanProperty._validate/original