def __init__(self, min=1, max=1, value=None): if value: self.generator = repeat(value) else: min, max = safe_range(min, max) self.generator = map(randrange, repeat(min), repeat(max))
def __init__(self, cls, min=0, max=1, count=None): self.cls = cls.__name__ if count: self.count = repeat(count) else: min, max = safe_range(min, max) self.count = map(randrange, repeat(min), repeat(max))
def __init__(self, min=1, max=1, value=None, count=None): if value: self.value = value self.words = self.exact_words elif count: self.count = repeat(count) self.words = self.ipsum_words else: min, max = safe_range(min, max) self.count = map(randrange, repeat(min), repeat(max)) self.words = self.ipsum_words