归档之于 ‘ 2012 年十二月 ’
import this
仅以pythonic的官方解释替代Hello World!作为本博的第一篇文章。
>>> import this
pythonic
Python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
The Zen of Python,by Tim Peters
Beautiful isbetter than ugly.
Explicit isbetter than implicit.
Simple isbetter than complex.
Complexisbetter than complicated.
Flat isbetter than nested.
Sparse isbetter 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'reDutch.
Now isbetter than never.
Although never isoften better than*right*now.
Ifthe implementation ishard 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'sdo more of those!
扫描二维码访问本站
扫描二维码访问本站