美文网首页
Python_格言

Python_格言

作者: 晟文刀 | 来源:发表于2016-09-12 23:25 被阅读243次

The Zen of Python

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_格言

    The Zen of Python Beautiful is better than ugly.优美胜于丑陋Exp...

  • Python函数的学习笔记_函数

    Python_函数 isinstance(a,int) #判断a是否为int If not (isinstance...

  • Python容器的学习笔记_容器

    Python_容器 my_str ='abcd\tc' # my_str[0]='Q' print(my_str)...

  • 文章链接集合

    作者:Gakki Python Python_查找字典中相同与不同的部分[https://www.jianshu....

  • matplotlib之tick_params( 参数 )

    参考链接:matplotlib命令与格式:tick_params参数刻度线样式设置_Python_开码河粉-CSD...

  • Python 编译安装

    目录 http://see.sl088.com/wiki/Python_%E7%BC%96%E8%AF%91%E5...

  • python_(:

    先看下object类中对new()方法的定义: object将new()方法定义为静态方法,并且至少需要传递一个参...

  • Python_函数

    Python_函数 在我们有面向对象思想后,会更加容易的理解。所以函数的章节内容会较为精简。 调用函数 Pytho...

  • 《黄泓圣格言》

    《黄泓圣格言》 #《黄泓圣格言》#格言#原创#原创格言#语录#语录经典#语录经典短句#句子#句子赏析#句子语录#今...

  • python安装

    点击进入python_官方网站下载所需版本 python2.7安装 1、双击安装文件 2、选择默认,为所有用户安装...

网友评论

      本文标题:Python_格言

      本文链接:https://www.haomeiwen.com/subject/jvtmettx.html