Vamei Source: Http://www.cnblogs.com/vamei Welcome reprint, Please also keep this statement. Thank you!
Python has an egg, which is recalled using the following statement:
Import this
The documentation for the egg is recorded in Pep 20.
After the statement is executed, the terminal will display a poem "The Zen of Python", the "path of Python". This poem summarizes the Python style and can guide the programming of Python programmers. Python programmers are proud to assert themselves as "pythonic." One of the basic standards of pythonic is to write code that conforms to the "Python Way".
Here is the full text of the Python path and my attached translation.
The Zen of Python, by Tim Peters
The way of Python
Beautiful is better than ugly.
Beauty is better than ugliness.
Explicit is better than implicit.
Display is better than implicit.
Simple is better than complex.
Simplicity is better than complexity.
Complex is better than complicated.
Complexity is better than excessive complexity.
Flat is better than nested.
Planes are better than nesting.
Sparse is better than dense.
Scarcity is better than dense.
Readability counts.
Readability needs to be considered.
Special cases aren ' t special enough to break the rules.
Even if the situation is special, it should not break the principle,
Although practicality beats purity.
Though practicality is better than purity.
Errors should never pass silently.
Mistakes should not be passed silently,
Unless explicitly silenced.
Unless you do it deliberately.
In the face of ambiguity, refuse the temptation to guess.
When there is confusion, refuse to speculate (in-depth understanding of the problem).
There should is one--and preferably only one--obvious the-do it.
There is always one, and (ideally) only one, obvious way to deal with the problem.
Although that is obvious at first unless you ' re Dutch.
Although that method may not be obvious, unless you are Dutch. (the author of Python, Guido, is a Dutch man, and this is a tribute)
Now is better than never.
Now it's better to start than never to start
Although never is often better than *right* now.
Although never start often than rush to start right away.
If the implementation is hard to explain, it's a bad idea.
If the program implementation is difficult to explain, then it is a bad idea.
If the implementation is easy to explain, it could be a good idea.
If the program implementation is easy to explain, it might be a good idea.
Namespaces is one honking great idea – let's do more than those!
Namespaces are a great idea, so let's use them more.
The "path to Python" emphasizes aesthetics, simplicity, readability, and practicality, rejecting complexity or ambiguity.
History
Tim Peters in June 4, 1999 of the Python mailing list, "The Python Way" as the title, published the "Path of Python", many Python programmers agree. On the other hand, the 2001 international Python Conference #10 (IPC10, IPC is the predecessor of Pycon), the organizers want to print a slogan on the T-shirt, and this slogan to represent the Python culture. The Python programmers who attended the meeting created more than 500. The organizer selected "Import this". Later, the Python author Guido added the this.py module, which allows the statement to be executed in the interpreter to print "The path of Python".
The Python community is humorous.
In addition, Pycon is a gathering of Python enthusiasts who can show off their Python projects or listen to lectures. The Pycon in 2012 was held simultaneously in Beijing and Shanghai.
Reference articles
Python complements Python's path