zoukankan      html  css  js  c++  java
  • python之禅以及 八荣八耻

     import this  

    1. >>>  
    2. The Zen of Python, by Tim Peters  
    3.   
    4. Beautiful is better than ugly.  
    5. 漂亮的代码要比丑陋的代码要好得多。  
    6. Explicit is better than implicit.  
    7. 明确的定义比 隐式定义更好。  
    8. Simple is better than complex.  
    9. 简单比负责要好。  
    10. Complex is better than complicated.  
    11. 负责要比搞复杂要好。  
    12. Flat is better than nested.  
    13. 扁平结构要比嵌套结构好。  
    14. Sparse is better than dense.  
    15. 简洁明了的代码要比稠密的代码要好。  
    16. Readability counts.  
    17. 可读写的计数。  
    18. Special cases aren't special enough to break the rules.  
    19. 专门的用例不是特殊到足以违反规则。  
    20. Although practicality beats purity.  
    21. 是的,实用性练就纯度。  
    22. Errors should never pass silently.  
    23. 错误永远都不会沉默。  
    24. Unless explicitly silenced.  
    25. 除非明确啥也不干。  
    26. In the face of ambiguity, refuse the temptation to guess.  
    27. 面对模糊定义、拒绝视图拍脑袋猜。  
    28. There should be one-- and preferably only one --obvious way to do it.  
    29. Although that way may not be obvious at first unless you're Dutch.  
    30. 虽然一开始不那面明确,我们会选择更清晰一条到走。  
    31. Now is better than never.  
    32. 现在开始总比不开始的要好。  
    33. Although never is often better than *right* now.  
    34. 虽然从不尝试总比现在开始尝试好。  
    35. If the implementation is hard to explain, it's a bad idea.  
    36. 如果实现难以说明,那它是个坏主意。  
    37. If the implementation is easy to explain, it may be a good idea.  
    38. 如果实现容易说明,那它是个好主意。  
    39. Namespaces are one honking great idea -- let's do more of those!  
    40. 名称空间是一个好东西——让我们做更多那样的东西!  




    Don't reinvent the wheel



    python 八荣八耻 

      1. 以动手实践为荣 , 以只看不练为耻;    
      2. 以打印日志为荣 , 以单步跟踪为耻;    
      3. 以空格缩进为荣 , 以制表缩进为耻;    
      4. 以单元测试为荣 , 以人工测试为耻;    
      5.   
      6. 以模块复用为荣 , 以复制粘贴为耻;    
      7. 以多态应用为荣 , 以分支判断为耻;    
      8. 以Pythonic为荣 , 以冗余拖沓为耻;    
      9. 以总结分享为荣 , 以X求其解为耻;  

    转自:  http://blog.163.com/jackylau_v/blog/static/17575404020118305341790/

  • 相关阅读:
    爱国论
    windows cmd: 打开windows系统程序或服务的常见命令
    Windows最常用的几个网络CMD命令总结
    什么是DNS劫持和DNS污染?
    windows cmd: 增强windows命令行
    NAT
    电信光纤猫 f412超级密码
    jvm之java类加载机制和类加载器(ClassLoader)的详解
    经典中的经典算法 动态规划(详细解释,从入门到实践,逐步讲解)
    首次适应算法、最佳适应算法和最差适应算法
  • 原文地址:https://www.cnblogs.com/mtima/p/2865662.html
Copyright © 2011-2022 走看看