【转】The Zen of Python
2013-12-19 10:19
183 查看
http://www.python.org/dev/peps/pep-0020/
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中安装xlrd模块
- Python学习笔记(五),条件,循环和其它语句(下)
- Python快速教程
- 服务端socket开发之多线程和gevent框架并发测试[python语言] 推荐
- Python 3 智能发音
- Python中Socket的Close方法假关闭Socket连接的问题
- PYTHON如何降级?
- Web自动化测试(1): Python+Behave+ Selenium Web Driver 在windows系统的安装
- Python脚本控制的WebDriver 常用操作 <二十四> 定位frame中的元素
- Python 多线程编程,thread
- Python Tkinter制作GUI
- Python 正则表达式,re模块
- Python 匿名函数lambda
- Python 异常处理
- Python for, while循环后面加else的作用
- Python random模块
- Python 为什么需要使用__name__=='__main__'
- Python 调试器debugger
- Python 变量赋值过程
- Python 表list, 元组tuple, 字典dict