刚看到这个,觉得好玩,就翻译了一下:

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!名空间真他爹的是个好主意--都过来多干吧!

fango