关于小悟志网站地图归档友情链接联系Feed

云上小悟 + 

首页 » InfoTech »

Python哲学(import this)

InfoTech
2017年1月28日 / 78次阅读
标签:麦新杰用Python

拍拍贷

文章《Python哲学(import this)》的特色图片

也有人说,这是Python的一个彩蛋,我看完之后,感觉这就是Python最高指导哲学。

打开你的Python解释器,然后输入import this,你就能看到这个彩蛋。注意,彩蛋只会显示一次,要想再次显示,必需重启你的解释器。

C:\Users\Administrator>python
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AM
D64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import this
The Zen of Python, by Tim Peters

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!
>>>
>>> import this
>>>

本文链接:http://www.maixj.net/ict/python-import-this-14117
云上小悟 麦新杰(QQ:1093023102)

相关文章

评论是美德

无力满足评论实名制,评论对非实名注册用户关闭,有事QQ:1093023102.


前一篇:
后一篇:

栏目精选


©Copyright 麦新杰 Since 2014 云上小悟独立博客版权所有 备案号:苏ICP备14045477号-1

网站二维码
拍拍贷
go to top