Ejemplo n.º 1
0
def main():
    arguments = docopt(__doc__, version='0.1.0')
    number = int(arguments.get('--number'))
    lines = bool(arguments.get('--lines'))
    end = '\n' if lines else ' '

    for i in xrange(number):
        sentence = repr(clause()).capitalize() + '.'
        print(sentence, end=end)

    if not lines:
        print()
Ejemplo n.º 2
0
def phrases(number):
    return (
        (repr(clause()).capitalize() + '.').decode('utf-8')
        for i in xrange(number)
    )
Ejemplo n.º 3
0
def phrases(n=20, lf=' '):
    phrase_list = [repr(clause()).capitalize() + '.'
                   for i in range(n)]
    return lf.join(phrase_list)