python之禅

Beautiful is better than ugly.

优美 > 丑陋

Explicit (清楚明白的; 易于理解的;)is better than implicit.(含蓄的; 不直接言明的;)

明确 > 隐晦 (1)

Simple is better than complex.(复杂)

简单 > 复杂

Complex is better than complicated.(复杂的,难懂的)

复杂 > 繁复 (2)

Flat(平的,扁平) is better than nested.(V.筑巢 嵌套)

扁平 > 嵌套

Sparse (稀少的; 稀疏的; 零落的)is better than dense.(稠密)

稀疏 > 拥挤(3)

Readability counts.

可读性很重要(4)

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!

固然代码的实用性比洁癖更重要,

除非必要,否则不要无故忽视异常(5)

如果遇到模棱两可的逻辑,请不要自作聪明地瞎猜。

应该提供一种,且最好只提供一种,一目了然的途径

当然这是没法一蹴而就的,除非你是荷兰人(6)

固然,立刻着手 好过 永远不做。

然而,永远不做 也好过 闷头蛮干

倘若你的实现很难解释,它一定不是个好主意

倘若你的实现一目了然,它可能是个好主意(7)

命名空间好,同志们要多多搞!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值