def isEmpty(lst): """ Indica si la lista está vacía Args: lst: La lista a examinar Raises: Exception """ try: return lt.isEmpty(lst) except Exception as exp: error.reraise(exp, 'TADList->isEmpty: ')
def isEmpty(map): """ Informa si la tabla de hash se encuentra vacia Args: map: El map Returns: True: El map esta vacio False: El map no esta vacio Raises: Exception """ bucket = lt.newList() empty = True for pos in range(lt.size(map['table'])): bucket = lt.getElement(map['table'], pos + 1) if lt.isEmpty(bucket) is False: empty = False break return empty