def _nextGuess(self, found, lastGuess):
        if found:
            self.min=lastGuess
        else:
            self.max=lastGuess

        if self.max==self.min \
           or self.max==self.min+1:
            return self.max

        max=self.max
        if max is None:
            max=self.min+1000

        guess=(max+self.min)/2
        d=self.makeAGuess(guess)
        d.addCallback(self._nextGuess, guess)
        return d
dataset/ETHPy150Open antong/ldaptor/ldaptor/numberalloc.py/freeNumberGuesser._nextGuess/original