Python之禅

2018-08-17 09:48:41来源:博客园 阅读 ()

新老客户大回馈,云服务器低至5折

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!

 

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:【leetcode 简单】第三十八题 Excel表列名称

下一篇:你的摄像头是如何被攻击的?你的一切行为都暴露在黑客眼中!