python 哲学或者说文化
2016-01-20 00:03
861 查看
在python 命令行提示符下面 输入 import this 能打出相关的内容。说的就是python设计哲学
>>> 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!
>>>
本文出自 “运维之路” 博客,请务必保留此出处http://wsq51i.blog.51cto.com/950571/1736646
>>> 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!
>>>
本文出自 “运维之路” 博客,请务必保留此出处http://wsq51i.blog.51cto.com/950571/1736646
相关文章推荐
- python:编写行政区域三级菜单(day 1)
- 浅析python正则表达式一:基本概念
- 浅析python正则表达式二:用好问号
- Solr Python API : SolrCloudpy 与 Pysolr 的 对比
- python中的注释
- python模拟登录某高校教务网
- Python 定向爬虫入门—Python(三)
- 第一天学习python
- python(1) -文件操作
- Python每日一练(1):计算文件夹内各个文章中出现次数最多的单词
- 自己手写使用python爬取糗事百科段子
- SyntaxError: Non-ASCII character ‘\xe5′ in file 关于python中的编码问题
- Python填坑记——作用域
- python实现mysql备份的脚本
- python list的一些用法
- Python定制容器
- 《笨办法学Python》 第17课手记
- Python的排序:关于sort()与sorted()
- 函数:Python的乐高积木
- 我的Python成长之路---第三天---Python基础(13)---2016年1月16日(雾霾)