这篇文章 明确表达了自己对“Explicit is Better than Implicit”的理解: Being explicit means being concrete and specific instead of abstract and general. It also means not to hide the behavior of a function. Explicit 意味着要具体、特化,不要抽象、通用。同时不要隐藏函数的行为。 对于要具体、特化,文...
Explicit is better than implicit. 明确优于含蓄。 Simple is better than complex. 简单胜过复杂。 Complex is better than complicated. 复杂好过晦涩。 Readability counts. 可读性真的很重要。 Special cases aren't special enough to break the rules. Although practicality beats purity. 再实用...
打开python命令行输入import this Beautiful is better than ugly. 美丽胜于丑陋。 Explicit is better than implicit. 明确胜于隐晦。 Simple is better than complex. 简单胜于复杂。 Complex is better than co…
而最能直观反映Python设计哲学思想的,应该是Python中的一个小彩蛋。我们只需要在编译器中输入:import this 然后运行,你会发现由Tim Peters所总结的“Python之禅“。全文如下:The Zen of Python, by Tim Peters Beautiful is better than ugly.Explicit is better than implicit.Simple is better than complex.Com...
The Zen ofPython, 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...
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. ...
Explicit is better than implicit. —— 外显好于内隐 好的代码是人们所能够理解的,只有你自己能够看懂的程序,并非是一个好程序。只是能够让别人感觉你很厉害,但是都看不懂,例如一个大型的游戏,需要多个伙伴一起对游戏的各个部分进行编码,只要一个人理解的编码就很难和别人一起合作。
Explicit is better than implicit. 明了胜于晦涩(优美的代码应当是明了的,命名规范,风格相似) Simple is better than complex. 简洁胜于复杂(优美的代码应当是简洁的,不要有复杂的内部实现) Complex is better than complicated. 复杂胜于凌乱(如果复杂不可避免,那代码间也不能有难懂的关系,要保持接口简洁) ...
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 ...
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. ... 在上面的代码中, open 函数以只读模式打开文本文件,这允许我们从文件中获取信息而不能更改它。在第一行, open 函数的...