- Python全棧開發:基礎入門
- 夏正東編著
- 409字
- 2023-08-10 16:17:10
1.2 Python的設計哲學
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.(雖然這種方式開始時并不容易,除非你是Python之父)
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!(命名空間就是一個絕妙的想法,應當多加利用)
- Vue.js設計與實現
- 嵌入式軟件系統測試:基于形式化方法的自動化測試解決方案
- C#程序設計實訓指導書
- LabVIEW入門與實戰開發100例
- JavaScript語言精髓與編程實踐(第3版)
- Python Game Programming By Example
- SQL基礎教程(視頻教學版)
- 人人都懂設計模式:從生活中領悟設計模式(Python實現)
- HDInsight Essentials(Second Edition)
- Learning ArcGIS for Desktop
- Learning Unreal Engine Android Game Development
- 寫給程序員的Python教程
- SCRATCH編程課:我的游戲我做主
- 深入大型數據集:并行與分布化Python代碼
- 數據結構與算法詳解