python哲学翻译_Python
正在學習Python開發語言的用戶,可能會在學習過程中聽說過講師說過Python有一段有關于Python的哲學理念機設計思想,在Python里輸入“import this”命令就會出現一段英文格言,這里我們把Python的這段格言的雙語版分享出來,幫助正在學習Python的用戶更加深入的了解Python的精髓。
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!
命名空間就是一個非常好的想法 —— 讓我們在這方面多做些工作吧!
總結
以上是生活随笔為你收集整理的python哲学翻译_Python的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 北京环球影城有存包处嘛
- 下一篇: 坚果和极米这两个牌子的投影机哪个更好?