seperate translation and origin

This commit is contained in:
Jerry Lee
2018-01-04 20:07:38 +08:00
parent 193b06dfb7
commit 1263d92d85

View File

@@ -5,48 +5,41 @@
<img src="py-icon.png" align="right" >
## 原文及译文
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
1. Beautiful is better than ugly.
美优于丑。
2. Explicit is better than implicit.
直白优于隐晦。
3. Simple is better than complex **_[1]_**.
简单优于复杂。
4. Complex is better than complicated **_[2]_** .
复杂优于纠结。
5. Flat is better than nested. **_[3]_**
扁平优于嵌套。
6. Sparse is better than dense **_[4]_** .
稀疏优于稠密。
7. Readability counts.
可读性是有重要价值的。
8. Special cases aren't special enough to break the rules.
特例可以有,但不能特例到打破规则。
- Although practicality beats purity.
尽管在纯粹性和实用性之间倾向的是实用性。
9. Errors should never pass silently.
出错决不应该无声无息地忽略。
- Unless explicitly silenced.
除非明确地说明了是无声无息的。
10. In the face of ambiguity, refuse the temptation to guess.
面对二义性情况时,要拒绝任何猜的诱惑。
11. 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 **_[5]_**.
尽管在刚开始的时候这个做法可能不是那么显而易见,毕竟你不是荷兰人。
12. Now is better than never **_[6]_**.
『现在』 优于 『决不』。
- Although never is often better than **right** now **_[7]_**.
尽管 『决不』 常常优于 『**马上**』。
13. If the implementation is hard to explain, it's a bad idea.
如果一个实现难于解释清楚,那它是个差的想法。
14. If the implementation is easy to explain, it may be a good idea.
如果一个实现很容易解释清楚,那它可能是个好的想法。
15. NameSpaces are one honking great idea -- let's do more of those!
命名空间是个值得大力宣扬的想法 — 放手多多用起来吧!
### 译注
- [`Python`哲学](#python%E5%93%B2%E5%AD%A6)
- [译注](#%E8%AF%91%E6%B3%A8)
- [个人讨论](#%E4%B8%AA%E4%BA%BA%E8%AE%A8%E8%AE%BA)
- [参考/阅读资料](#%E5%8F%82%E8%80%83%E9%98%85%E8%AF%BB%E8%B5%84%E6%96%99)
- [`Python` Philosophy](#python-philosophy)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
# `Python`哲学
1. 美优于丑。
1. 直白优于隐晦。
1. 简单优于复杂。 <sup>**_[1]_**</sup>
1. 复杂优于纠结。 <sup>**_[2]_**</sup>
1. 扁平优于嵌套。 <sup>**_[3]_**</sup>
1. 稀疏优于稠密。 <sup>**_[4]_**</sup>
1. 可读性是有重要价值的。
1. 特例可以有,但不能特例到打破规则。
- 尽管在纯粹性和实用性之间倾向的是实用性。
1. 出错决不应该无声无息地忽略。
- 除非明确地说明了是无声无息的。
1. 面对二义性情况时,要拒绝任何猜的诱惑。
1. 一件事应该一种做法 —— 并且宁愿只有一种做法 —— 一种显而易见的做法。
- 尽管在刚开始的时候这个做法可能不是那么显而易见,毕竟你不是荷兰人。 <sup>**_[5]_**</sup>
1. 『现在』 优于 『决不』。 <sup>**_[6]_**</sup>
- 尽管 『决不』 常常优于 『**马上**』。 <sup>**_[7]_**</sup>
1. 如果一个实现难于解释清楚,那它是个差的想法。
1. 如果一个实现很容易解释清楚,那它可能是个好的想法。
1. 命名空间是个值得大力宣扬的想法 — 放手多多用起来吧!
## 译注
**_[1] [2]_** 单词 complex 的意思是 复杂,而 complicated 是 结构复杂。
@@ -88,7 +81,7 @@ PS 核心复杂度的说明讨论可以参见[《代码大全》](http://book
更多『世界上最不能相信』的话参见[世界上最不能相信的几句话](http://blog.renren.com/share/339618932/7590788371)。
- 『马上』做 === 不经过思考的不做,结果系统没有做一个本该这个系统做的功能!然后这个功能在不合适的地方被实现,即系统设计有问题。
## 个人讨论
# 个人讨论
既有指明大是大非的理念,又有指导细节操作的准则。
@@ -100,7 +93,7 @@ PS 核心复杂度的说明讨论可以参见[《代码大全》](http://book
`Python`说得内容对生活个人觉得一样有指导性,果然是哲学。
## 参考/阅读资料
# 参考/阅读资料
1. [Python(programming language) - Wikipedia](http://en.wikipedia.org/wiki/Python_%28programming_language%29#Programming_philosophy)
1. [No programming language offers what Python does philosophically.](http://www.indicthreads.com/1062/no-programming-language-offers-what-python-does-philosophically/)
@@ -109,3 +102,26 @@ PS 核心复杂度的说明讨论可以参见[《代码大全》](http://book
这里还有其它有关`Python`有意思的东西。
1. 核心复杂度的说明参见[《代码大全》](http://book.douban.com/subject/1477390/)一书。
1. [世界上最不能相信的几句话](http://blog.renren.com/share/339618932/7590788371)
# `Python` Philosophy
1. Beautiful is better than ugly.
1. Explicit is better than implicit.
1. Simple is better than complex.
1. Complex is better than complicated .
1. Flat is better than nested.
1. Sparse is better than dense .
1. Readability counts.
1. Special cases aren't special enough to break the rules.
- Although practicality beats purity.
1. Errors should never pass silently.
- Unless explicitly silenced.
1. In the face of ambiguity, refuse the temptation to guess.
1. 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.
1. Now is better than never.
- Although never is often better than **right** now.
1. If the implementation is hard to explain, it's a bad idea.
1. If the implementation is easy to explain, it may be a good idea.
1. NameSpaces are one honking great idea -- let's do more of those!