发新话题
打印

Python禅学

Python禅学

在任何安装好的Python版本中都包含着“Python禅学(The Zen of Python)”,在任何Python的交互界面(比如IDLE)中输入:

>>> import this

并回车,将会出现如下的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!
The limits of my language mean the limits of my world.

HOHO,蛮有意思的,看出了点门道。

  习惯的力量是可怕的!我发现手机必须要放在笔记本的左边,因为放在右边的话,每次我都会情不自禁地去握它当鼠标用~
嗯,我刚刚试了一下,有的!嘿嘿
喔,看到了。

算彩蛋麽。
*
* WELCOME to the VeriSign Global Registry Service Whois Server.
*
* Sorry, the Whois database is currently down.
*
* Please wait a while and try again.  Thanks
*
引用:
原帖由 henry.ning 于 2007-3-30 00:08 发表
喔,看到了。

算彩蛋麽。
“彩蛋”?什么意思啊?
开源:人之所需,时之所趋,共进之模式!
http://mathbox.lupaworld.com
现在已经懂"彩蛋"是什么意思了,时隔一年左右.
开源:人之所需,时之所趋,共进之模式!
http://mathbox.lupaworld.com
呵呵,彩蛋哇!!
学习












----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
发新话题