The Zen of Python, by Tim Peters

1import this
 1The Zen of Python, by Tim Peters
 2
 3Beautiful is better than ugly.
 4Explicit is better than implicit.
 5Simple is better than complex.
 6Complex is better than complicated.
 7Flat is better than nested.
 8Sparse is better than dense.
 9Readability counts.
10Special cases aren't special enough to break the rules.
11Although practicality beats purity.
12Errors should never pass silently.
13Unless explicitly silenced.
14In the face of ambiguity, refuse the temptation to guess.
15There should be one-- and preferably only one --obvious way to do it.
16Although that way may not be obvious at first unless you're Dutch.
17Now is better than never.
18Although never is often better than *right* now.
19If the implementation is hard to explain, it's a bad idea.
20If the implementation is easy to explain, it may be a good idea.
21Namespaces are one honking great idea -- let's do more of those!
 1Tim Peters的Python之禅
 2
 3美丽胜过丑陋。
 4显式优于隐式。
 5简单比复杂更好。
 6复杂比复杂更好。
 7Flat优于嵌套。
 8稀疏优于密集。
 9可读性很重要。
10特殊情况不足以打破规则。
11虽然实用性胜过纯洁。
12错误不应该默默地传递。
13除非明确沉默。
14面对模棱两可,拒绝猜测的诱惑。
15应该有一个 - 最好只有一个 - 明显的方法来做到这一点。
16虽然这种方式起初可能并不明显,除非你是荷兰人。
17现在比永远好。
18虽然现在永远不会比*正确好。
19如果实施很难解释,这是一个坏主意。
20如果实现很容易解释,那可能是个好主意。
21命名空间是一个很棒的主意 - 让我们做更多的事情吧!

德64.png