The Zen of Python

by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
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.
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.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
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.
Namespaces are one honking great idea -- let's do more of those!

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

推薦閱讀更多精彩內(nèi)容

  • **2014真題Directions:Read the following text. Choose the be...
    又是夜半驚坐起閱讀 9,890評(píng)論 0 23
  • 這只狗狗可愛無比,身子長(zhǎng)長(zhǎng)的,圓溜溜的腦袋,想玻璃珠一樣的眼睛,像一個(gè)十足的毛絨玩具。。一個(gè)字形容它:萌;兩...
    東皇泥鰍閱讀 392評(píng)論 1 0
  • 沒有在深夜痛哭的人,不足以談人生。 有些時(shí)候,我們不得不承認(rèn)造化弄人,命運(yùn)總是出其不易,我們必須得去承受一些打擊,...
    霍本本閱讀 408評(píng)論 1 2
  • 今天聽了葉老師的課,做事情要列清單,然后再分類,實(shí)行要事優(yōu)先選擇,每天最少吃三個(gè)青蛙,然后再根據(jù)日程表上清單進(jìn)行做事。
    阿碩的蘋果閱讀 104評(píng)論 0 0
  • 天氣轉(zhuǎn)涼,已經(jīng)到了秋末冬初的季節(jié),可能很多人都會(huì)感覺焦躁,和莫名的憂傷,有時(shí)會(huì)覺得恍惚,茫然,不知道該干點(diǎn)什么,心...
    劉海峰6閱讀 13,472評(píng)論 0 2