python之禅-aoaopython

🌸 python之禅

  1. Beautiful is better than ugly.
    美丽胜于丑陋。

  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.
    尽管这种方式一开始可能不明显,除非你是荷兰人。

  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!
    命名空间是个了不起的想法 – 让我们做更多这样的事情!


转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 xieaoao@qq.com QQ:1296454177

×

喜欢就点赞,疼爱就打赏