zoukankan      html  css  js  c++  java
  • 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的禅,由提姆彼得斯

    美丽比丑陋好。

    外显胜于内隐。

    简单比复杂。

    复杂的是比复杂的。

    平比嵌套好。

    稀疏比致密。

    可读性计数。

    特殊情况下是不够的,打破规则。

    虽然实用性节拍纯度。

    错误永远不会通过无声。

    除非显式地沉默。

    面对模糊,拒绝猜测的诱惑。

    应该有一个-最好只有一个-明显的方式去做。

    虽然这种方式可能不明显,除非你是荷兰人。

    现在比从来没有。

    虽然从来没有比现在更好。

    如果实施是很难解释的,这是个坏主意。

    如果实施容易解释,这可能是一个好主意。

    名称空间是一个伟大的想法-让我们做更多的!

    本文为"测试那点事_TestYao"博客整理收集,转载请注明出处,谢谢!
  • 相关阅读:
    查询SQL数据库中表占用资源情况的语句
    修改VMware网卡MAC的方法
    Ajax 与 .net Validator
    控件属性值绑定到数据
    一个设计的小例子警察抓小偷
    加密Web.config 文件中的敏感信息
    VS .Net 2005程序集换名之后的遗留问题
    为ASP.Net 创建和配置应用程序服务数据库
    ArcGIS 9.0 在Windows XP SP2 上安装的问题(数据保护造成的)
    使用客户端脚本
  • 原文地址:https://www.cnblogs.com/testyao/p/5319083.html
Copyright © 2011-2022 走看看