`
lin_llx
  • 浏览: 125371 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

The Zen of Python

阅读更多
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!
分享到:
评论

相关推荐

    python之禅.docx

    >>>import this The Zen of Python, by Tim Peters Beautiful is better than ugly. 优美胜于丑陋。(Python以编写优美的代码为目标)

    Pro Python 2nd edition 英文pdf

    Pro Python 第2版,2014.12.17出版的新书 You’ve learned the basics of ...14. The Zen of Python 15. Docstring Conventions 16. Backward Compatibility Policy 17. Python 3000 18. Python Language Moratorium

    Pro Python 3, 3rd 英文版

    Understand The Zen of Python documentation to help you decide the best way to distribute your code Who This Book Is For Intermediate programmers familiar with Python who are looking to move to an ...

    Pro Python 3, 3rd Edition,python学习

    Understand The Zen of Python documentation to help you decide the best way to distribute your code ============================================================================== Who This Book Is For ...

    [详细完整版]PYTHON.doc

    关于PYTHON的调查 08级师范班 张世杰 1272408046 一、关于python的含义 Python,是...这在由Tim Peters写的python格言(称为The Zen of Python)里面表述为:There should be one-- and preferably only one --obvious

    python基础教程pdf(1).docx

    这在由Tim Peters写的Python格言(称为The Zen of Python)里面表述为:There should be one-- and preferably only one --obvious way to do it. 这正好和Perl语言(另一种功能类似的高级动态语言)的中心思想...

    单元测试框架.txt

    The Zen of Python 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 ...

    用pthon实现贪吃蛇.zip

    这在由Tim Peters写的Python格言(称为The Zen of Python)里面表述为:There should be one-- and preferably only one --obvious way to do it. 这正好和Perl语言(另一种功能类似的高级动态语言)的中心思想...

    ImagesBy360.zip

    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. ...

    Pro python 2

    ■Chapter 1: Principles and Philosophy ■Chapter 2: Advanced Basics ■Chapter 3: Functions ■Chapter 4: Classes ...■Appendix C: The Zen of Python ■Appendix D: Docstring Conventions

    Python语法分析之字符串格式化

    ———— the Zen of Python 意译:Python提倡用一种,而且最好是只有一种方法来完成一件事 虽然 Python 有以上的提倡,但却在字符串格式化方面,没有做到这一点。 字符串格式化 敲黑板,划重点:在 Python 中有...

    Python 中的 else详解

    另外,对于这些用法是否符合 0×00 The Zen of Python 的原则以及该不该广泛使用也存在很多争议。例如在我看到的两本书里(Effective Python VS Write Idiomatic Python),两位作者就分别对其持有截然不同的态度。 ...

    Python之禅&编码规范&一键排版

    首先,各个编程语言都有自己的代码规范,统一...在交互式解释器中输入import this就会显示 Tim Peters 的 “The Zen of Python” 当然,也可以在pycharm中: import this print() 放张高清大图: 整体意思就是Python

    几种实用的pythonic语法实例代码

    关于 pythonic,你可以在终端打开 python,然后输入 import this,看看输出什么,这就是 Tim Peters 的 《The Zen of Python》,这首充满诗意的诗篇里概况了 python 的设计哲学,而这些思想,其实在所有语言也基本上...

    nodebook:节点笔记本(实验)

    经典笔记本格式{ cells : [ { cell_type : "code" , source : "import this" outputs : [ { output_type : "stream" data : "The Zen of Python, by Tim Peters" } ] } , { cell_type : "markdown" , source : "# My...

    tr命令在统计英文单词出现频率中的妙用

    tr命令我们很清楚,可以删除替换,删除...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 complicat

    leetcode中国-programming-coding-practice:编码练习

    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 ...

    holbertonschool-higher_level_programming:Python

    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 ...

    holbertonschool-higher_level_programming

    What is the Zen of Python How to use the Python interpreter How to print text and variables using print How to use strings What are indexing and slicing in Python What is the official Holberton Python...

Global site tag (gtag.js) - Google Analytics