作者Tim Peters
Beautiful is better than ugly. 優(yōu)美比丑陋更好
Explicit is better than implicit.顯明比隱晦更好
Simple is better than complex.簡單比復(fù)雜更好
Complex is better than complicated.復(fù)雜比繁瑣更好
Flat is better than nested.平實比雜亂更好
Sparse is better than dense.稀疏比密集更好
Readability counts.可讀性很重要
Special cases aren't special enough to break the rules.特殊情形不夠特殊以打破慣例
Although practicality beats purity.盡管實踐性可以戰(zhàn)勝單純性
Errors should never pass silently.絕不能放任錯誤自流
Unless explicitly silenced.除非無法洞悉
In the face of ambiguity, refuse the temptation to guess.面對亂碼钟鸵,拒絕猜測
There should be one-- and preferably only one --obvious way to do it.那應(yīng)該是有一個助被,應(yīng)只有一個,顯然的解決方式
Although that way may not be obvious at first unless you're Dutch.盡管那個方式可能一開始不是很明顯晰筛,除非你是荷蘭人可以預(yù)知
Now is better than never.現(xiàn)在就去做比從不做更好
Although never is often better than *right* now.盡管從不去做常常比比不假思索馬上去做更好
If the implementation is hard to explain, it's a bad idea.如果完善很難解釋,那肯定很糟
If the implementation is easy to explain, it may be a good idea.如果完善很容易解釋,那應(yīng)該不錯
Namespaces are one honking great idea -- let's do more of those! 命名空間是一個偉大的靈光,讓我們多做幾次