Пример #1
0
 def index(self, item):
     index = busca_bin(self, item)
     index = self.trata_vizinho(item, index)
     if (index < 0):
         raise ValueError()
     else:
         return index
Пример #2
0
 def add(self, novo):
     index = busca_bin(self, novo, True)
     try:
         if (novo > self.__lista[index]):
             index += 1
     except IndexError, e:
         pass
Пример #3
0
 def index(self, item):
     index = busca_bin(self, item)
     index = self.trata_vizinho(item, index)
     if (index < 0):
         raise ValueError()
     else:
         return index
Пример #4
0
 def add(self, novo):
     index = busca_bin(self, novo, True)
     try:
         if (novo > self.__lista[index]):
             index += 1
     except IndexError, e:
         pass
Пример #5
0
 def __contains__(self, item):
     return (busca_bin(self, item) >= 0)
Пример #6
0
 def __contains__(self, item):
     return (busca_bin(self, item) >= 0)