Exemplo n.º 1
0
    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))
Exemplo n.º 2
0
    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))
Exemplo n.º 3
0
    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