Python之禅中文版
时间: 2023-11-05 15:48:19 浏览: 218
Python中文版.pdf
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!
命名空间是个绝妙的想法,请多加利用!
阅读全文