Python论坛  - 讨论区

标题:[python-chinese] python 禅宗

2005年02月15日 星期二 22:51

jian wang wangjian5748 at sohu.com
Tue Feb 15 22:51:12 HKT 2005

在解释器中输入import this
>>> import this
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 禅宗   by Tim Peters
美丽逼丑陋好
明显比隐晦好
简单比复合好
复合比复杂好
扁平比嵌套好
稀疏比密集好
可读性最重要
特殊案例不可以特殊到打破规则
尽管实用性比纯度重要
但错误从来不会默默消失
除非显式地使其平静
面对模糊,拒绝猜测的诱惑
应该有一个(宁愿只有一个)显而易见的解决的解决方法
尽管刚开始方法不会是很明显,除非你是Dutch
现在着手做比从来不做好
尽管从来不做要比"立刻"着手做好
如果实现很难解释,那么它就不是一个好注意
如果实现很容易解释,那么这就是一个好注意
名称空间是一个正在召唤的绝妙想法--大家一起来实践这些规则吧!


        致
礼!
 				

        jian wang
        wangjian5748 at sohu.com
          2005-02-15

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年02月16日 星期三 12:52

wjj  gardenspirit at 163.com
Wed Feb 16 12:52:11 HKT 2005

python-chinese,您好!

	偶也要退订。	

        此致
敬礼!
 				

        wjj 
        gardenspirit at 163.com
          2005-02-16

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号