Next point in iteration

def next(self):
        """Next point in iteration
        """
        if self.probability == 1:
            x, y = next(self.scan)
        else:
            while True:
                x, y = next(self.scan)
                if random.random() <= self.probability: break
        return x, y