class PeselGenerator(object): def __init__(self): self.generator = PeselGen() self.generated_values = set() def __call__(self, x): number = self.generator.return_pesel() while number in self.generated_values: number = self.generator.return_pesel() self.generated_values.add(number) return number
def __init__(self): self.generator = PeselGen() self.generated_values = set()