zoukankan      html  css  js  c++  java
  • The Zen Of Python

    补充些Python方面的文化,文章翻译自http://legacy.python.org/dev/peps/pep-0020/  同步于 http://polarisary.github.io/2014/07/01/the-zen-of-python/

    Beautiful is better than ugly.

    bash 整洁胜于杂乱

    Explicit is better than implicit.

    bash 明了胜于隐晦

    Simple is better than complex.

    bash 简单胜于复杂

    Complex is better than complicated.

    bash 复杂胜于混乱

    Flat is better than nested.

    bash 递推胜于嵌套`

    Sparse is better than dense.

    bash 稀疏胜于稠密

    Readability counts.

    bash 可读性是最重要的---易读

    Special cases aren't special enough to break the rules.

    bash 特例不足以打破规则

    Although practicality beats purity.

    bash 但是,实用性胜于纯粹套用

    Errors should never pass silently.

    bash 错误不应该不报

    Unless explicitly silenced.

    bash 除非另有明确的目的

    In the face of ambiguity, refuse the temptation to guess.

    bash 不清楚的,不能去猜

    There should be one-- and preferably only one --obvious way to do it.

    bash 总会有一种方式来解决问题,并且通常只有一种

    Although that way may not be obvious at first unless you're Dutch.

    bash 然而,这种解决问题的方式在一开始不是那么的明了,除非你有先见之明

    Now is better than never.

    bash 现在,有一种不明了的解决方案比从来没有好

    Although never is often better than right now.

    bash 然而,仓促的解决不然没有

    If the implementation is hard to explain, it's a bad idea.

    bash 如果方案不明确,就是个坏的想法

    If the implementation is easy to explain, it may be a good idea.

    bash 相反,则是个好的主意

    Namespaces are one honking great idea -- let's do more of those!

    bash 名字空间是个好的设计,我们应该好好的使用它

  • 相关阅读:
    宝塔面板的数据库使用
    Spring MVC入门
    从分式第n项到线性递推——bostan-mori 算法的扩展应用
    计算几何专题训练
    博客整理
    wpf ScrollViewer自动滚到最上
    word2Vec笔记2021
    好用工具备份
    Samtools pick up seq
    Ryzen核显需要扩大显存吗?
  • 原文地址:https://www.cnblogs.com/zeng-wei/p/3817960.html
Copyright © 2011-2022 走看看