

def delete(self, entity):
    'Registers entity to delete from datastore.\n\n    Args:\n      entity: an entity, model instance, or key to delete.\n    '
    key = _normalize_key(entity)
    key_size = len(key._ToPb().Encode())
    if ((self.deletes.length >= MAX_ENTITY_COUNT) or ((self.deletes.size + key_size) > self.max_pool_size)):
        self.__flush_deletes()
    self.deletes.append(key, key_size)

dataset/ETHPy150Open livid/v2ex/mapreduce/context.py MutationPool.delete/original