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@141
|
5 |
("Beautiful is better than ugly.", '__Tim Peters, The Zen of Python'),
|
peter@141
|
6 |
("Explicit is better than implicit.", '__Tim Peters, The Zen of Python'),
|
peter@141
|
7 |
("Simple is better than complex.", '__Tim Peters, The Zen of Python'),
|
peter@141
|
8 |
("Complex is better than complicated.", '__Tim Peters, The Zen of Python'),
|
peter@141
|
9 |
("Flat is better than nested.", '__Tim Peters, The Zen of Python'),
|
peter@141
|
10 |
("Sparse is better than dense.", '__Tim Peters, The Zen of Python'),
|
peter@141
|
11 |
("Readability counts.", '__Tim Peters, The Zen of Python'),
|
peter@141
|
12 |
("Special cases aren't special enough to break the rules.", '__Tim Peters, The Zen of Python'),
|
peter@141
|
13 |
("Although practicality beats purity.", '__Tim Peters, The Zen of Python'),
|
peter@141
|
14 |
("Errors should never pass silently.", '__Tim Peters, The Zen of Python'),
|
peter@141
|
15 |
("Unless explicitly silenced.", '__Tim Peters, The Zen of Python'),
|
peter@141
|
16 |
("In the face of ambiguity, refuse the temptation to guess.", '__Tim Peters, The Zen of Python'),
|
peter@141
|
17 |
("Although that way may not be obvious at first unless you're Dutch.", '__Tim Peters, The Zen of Python'),
|
peter@141
|
18 |
("Now is better than never.", '__Tim Peters, The Zen of Python'),
|
peter@141
|
19 |
("Although never is often better than *right* now.", '__Tim Peters, The Zen of Python'),
|
peter@141
|
20 |
("If the implementation is hard to explain, it's a bad idea.", '__Tim Peters, The Zen of Python'),
|
peter@141
|
21 |
("If the implementation is easy to explain, it may be a good idea.", '__Tim Peters, The Zen of Python'),
|
peter@141
|
22 |
("Namespaces are one honking great idea -- let's do more of those!", '__Tim Peters, The Zen of Python'),
|
peter@141
|
23 |
]
|
peter@141
|
24 |
|
peter@141
|
25 |
shuffle(sayings)
|
peter@141
|
26 |
|
peter@141
|
27 |
saying, author = sayings[0]
|
peter@141
|
28 |
return saying, author
|