sayings.py
author Peter Koppatz <peter@koppatz.com>
Sat, 18 Jan 2014 21:05:22 +0100
changeset 144 3b768d0f09ef
parent 141 ea70f3d81676
child 146 2e05b89881ed
permissions -rw-r--r--
code revue
peter@141
     1
from random import shuffle
peter@141
     2
peter@141
     3
def get_saying():
peter@141
     4
    sayings = [('The Zen of Python, by Tim Peters', '__Tim Peters, The Zen of Python'),
peter@144
     5
               ("Beautiful is better than ugly.", '__Tim Peters, The Zen of Python'),
peter@144
     6
               ("Explicit is better than implicit.", '__Tim Peters, The Zen of Python'),
peter@144
     7
               ("Simple is better than complex.", '__Tim Peters, The Zen of Python'),
peter@144
     8
               ("Complex is better than complicated.", '__Tim Peters, The Zen of Python'),
peter@144
     9
               ("Flat is better than nested.", '__Tim Peters, The Zen of Python'),
peter@144
    10
               ("Sparse is better than dense.", '__Tim Peters, The Zen of Python'),
peter@144
    11
               ("Readability counts.", '__Tim Peters, The Zen of Python'),
peter@144
    12
               ("Special cases aren't special enough to break the rules.", '__Tim Peters, The Zen of Python'),
peter@144
    13
               ("Although practicality beats purity.", '__Tim Peters, The Zen of Python'),
peter@144
    14
               ("Errors should never pass silently.", '__Tim Peters, The Zen of Python'),
peter@144
    15
               ("Unless explicitly silenced.", '__Tim Peters, The Zen of Python'),
peter@144
    16
               ("In the face of ambiguity, refuse the temptation to guess.", '__Tim Peters, The Zen of Python'),
peter@144
    17
               ("Although that way may not be obvious at first unless you're Dutch.", '__Tim Peters, The Zen of Python'),
peter@144
    18
               ("Now is better than never.", '__Tim Peters, The Zen of Python'),
peter@144
    19
               ("Although never is often better than *right* now.", '__Tim Peters, The Zen of Python'),
peter@144
    20
               ("If the implementation is hard to explain, it's a bad idea.", '__Tim Peters, The Zen of Python'),
peter@144
    21
               ("If the implementation is easy to explain, it may be a good idea.", '__Tim Peters, The Zen of Python'),
peter@144
    22
               ("Namespaces are one honking great idea -- let's do more of those!", '__Tim Peters, The Zen of Python'),
peter@144
    23
               ]
peter@144
    24
    
peter@141
    25
    shuffle(sayings)
peter@144
    26
    
peter@141
    27
    saying, author = sayings[0]
peter@141
    28
    return saying, author
Impressum Datenschutzerklärung