1. Beautiful is better than ugly.   # 优美好于丑陋(Python以编写优美的代码为目标)
  2. Explicit is better than implicit.   # 明确好于暗示
  3. Simple is better than complex.   # 简洁好于复杂
  4. Complex is better than complicated.   # 复杂好于凌乱
  5. Flat is better than nested.   # 扁平好于嵌套
  6. Sparse is better than dense.   # 间隔好于密集
  7. Readability counts.   # 可读性很有价值
  8. Special cases aren't special enough to break the rules.   # 特殊情况不足以打破规则
  9. Although practicality beats purity.   # 尽管实用性胜过纯粹性
  10. Errors should never pass silently.   # 错误不应该悄无声息地过去
  11. Unless explicitly silenced.   # 除非显示指定要这么做
  12. In the face of ambiguity, refuse the temptation to guess.   # 面对模棱两可,拒绝猜测的诱惑
  13. There should be one -- and preferably only one -- obvious way to do it.   # 应该有一种 -- 而且最好只有一种 -- 明确的方法来完成它
  14. Although that way may not be obvious at first unless you're Dutch.   # 虽然那种方法一开始可能并不明显,除非你是 Dutch(Python 之父)
  15. Now is better than never.   # 现在做好于永远不做
  16. Although never is often better than *right* now.   # 尽管不思考盲目动手做通常还不如不做
  17. If the implementation is hard to explain, it's a bad idea.   # 如果方案很难向人描述,那肯定是一个坏方案
  18. If the implementation is easy to explain, it may be a good idea.   # 如果方案容易向人描述,那可能一个好方案
  19. Namespaces are one honking great idea -- let's do more of those!   # 命名空间是个绝妙的主意,让我们做更多这样的事

注:在 Python 的交互式解释器中输入 import this 就可以查阅到上述文档。

The Zen of Python —— Python 之禅的更多相关文章

  1. python --- Python中的callable 函数

    python --- Python中的callable 函数 转自: http://archive.cnblogs.com/a/1798319/ Python中的callable 函数 callabl ...

  2. Micro Python - Python for microcontrollers

    Micro Python - Python for microcontrollers MicroPython

  3. 从Scratch到Python——python turtle 一种比pygame更加简洁的实现

    从Scratch到Python--python turtle 一种比pygame更加简洁的实现 现在很多学校都开设了Scratch课程,学生可以利用Scratch创作丰富的作品,然而Scratch之后 ...

  4. 从Scratch到Python——Python生成二维码

    # Python利用pyqrcode模块生成二维码 import pyqrcode import sys number = pyqrcode.create('从Scratch到Python--Pyth ...

  5. [Python]Python 使用 for 循环的小例子

    [Python]Python 使用 for 循环的小例子: In [7]: for i in range(5): ...: print "xxxx" ...: print &quo ...

  6. [python]python 遍历一个list 的小例子:

    [python]python 遍历一个list 的小例子: mlist=["aaa","bbb","ccc"]for ss in enume ...

  7. [Python]Python日期格式和字符串格式相互转换

    由字符串格式转化为日期格式的函数为: datetime.datetime.strptime() 由日期格式转化为字符串格式的函数为: datetime.datetime.strftime() # en ...

  8. [python]Python 字典(Dictionary) update()方法

    update() 函数把字典dict2的键/值对更新到dict里.如果后面的键有重复的会覆盖前面的语法dict.update(dict2) dict = {'Name': 'Zara', 'Age': ...

  9. python编程之禅

    在python界面输入 import this >>> import this The Zen of Python, by Tim Peters Beautiful is bette ...

随机推荐

  1. 创建linux中的nginx+php7+mysql环境----PHP7安装

    默认CentOs 的源  并没有php7的安装路径,所以需要手动添加源: # rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-l ...

  2. 【Linux】gnuplot命令大全

    gnuplot命令大全 在linux命令提示符下运行gnuplot命令启动,输入quit或q或exit退出. plot命令 gnuplot> plot sin(x) with line line ...

  3. 【NS2】ubuntu安装和同时使用不同版本的ns2(转载)

    有时候我们可能会遇到要同时安装两个ns版本的问题,比如我研究wimax/802.16,因为协议太复杂,用的是长庚大学和nist的wimax补丁.长庚大学的wimax补丁是在ns2.29下开发的,nis ...

  4. 2019-8-31-dotnet-通过-WMI-获取设备厂商

    title author date CreateTime categories dotnet 通过 WMI 获取设备厂商 lindexi 2019-08-31 16:55:59 +0800 2019- ...

  5. 2019-9-30-WPF-运行时迁移-EF-Core-数据库

    title author date CreateTime categories WPF 运行时迁移 EF Core 数据库 lindexi 2019-09-30 20:19:16 +0800 2019 ...

  6. @noi.ac - 443@ 老头子的话

    目录 @description@ @solution@ @accepted code@ @details@ @description@ 老头子是小学校长,小学生(大哥)们都很听老头子的话.一天,老头子 ...

  7. BERT大火却不懂Transformer?读这一篇就够了 原版 可视化机器学习 可视化神经网络 可视化深度学习

    https://jalammar.github.io/illustrated-transformer/ The Illustrated Transformer Discussions: Hacker ...

  8. Element-ui学习笔记3--Form表单(一)

    Radio单选框 要使用 Radio 组件,只需要设置v-model绑定变量,选中意味着变量的值为相应 Radio label属性的值,label可以是String.Number或Boolean. & ...

  9. CodeForces 825G"Tree Queries"(选根建树)

    传送门 •参考资料 [1]:CodeForces 825G Educational Round #25 G :建树选根大法+O1大法+iostream解绑了还是慢 •题意 给定一颗包含 n 个节点的树 ...

  10. 2019-9-2-给博客添加rss订阅

    title author date CreateTime categories 给博客添加rss订阅 lindexi 2019-09-02 12:57:38 +0800 2018-2-13 17:23 ...