设为首页 加入收藏

TOP

Python里隐藏的 " 诗 "
2017-09-30 17:43:20 】 浏览:9152
Tags:Python 隐藏 "

在 Python 的Lib目录里有一个:this.Py (或者在交互式解释器中输入import this) 它其实是隐藏的一首诗

The Zen of Python, by Tim Peters
《Python 的禅》 by 提姆·彼特
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!
命名空间是一个让人尖呼的伟大构想 —— 我们应该在那方面做得更多!

 

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇django-用户验证系统 下一篇python的历史

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目