Python's design philosophy --zen of Python

           Python's design philosophy --zen of Python

 

 

Beautiful is better than ugly. Beautiful is better than ugly

Explicit is better than implicit. Understand better than obscure

Simple is better than complex. Simple is better than complex

Complex is better than complicated. Complicated than messy

Flat is better than nested. Nested better than flat

Sparse is better than dense. Intervals rather than compact

Readability counts. Readability is very important

Special cases are not special enough to break the rules. Even a special case under the guise of the name of practicality, nor violate these rules

Although practicality beats purity. Although inferior purity Applicability

Errors should never pass silently. Errors should not be ignored silent

Unless explicitly silenced. Unless explicitly silence       

In the face of ambiguity, refuse the temptation to guess. When there are multiple possible, do not try to guess

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

Although that way may not be obvious at first unless you're Dutch. While this may not be easy, unless you are the father of python

Now is better than never. Now than never

Although never is often better than * right * now. While in the past has never been better than now

If the implementation is hard to explain, it's a bad idea. If this realization is not easy to explain, it is definitely a bad idea

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

Namespaces are one honking great idea -! Let's do more of those namespaces is a wonderful idea, it should be more use

This is the Zen of Python, Guido van Rossum certainly is an interesting man, able to design show in the python interpreter, before the "hello world" program begins, it also has some philosophy of life ah

Guess you like

Origin www.cnblogs.com/tsingke/p/11126806.html