A way into python deep like the sea--python

Source: Internet
Author: User

There is no shortage of humor in the Python community. First look at the poem "The Path of Python".

Import this package:

Import this

The output is a poem,This poem summarizes the Python style and can guide the programming of the Python program ape.

Here are the translations:

The Zen of Python, by Tim Peterspython Road 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 over-complexity. Flat is better than nested. Plane is 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, the principle should not be broken. Although practicality beats purity. Though usefulness is better than purity.

Errors should never pass silently. The error 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, reject the push (in-depth clarification). There should is one--and preferably only one--obvious ways to do it. There is always one, and (ideally) there is only an obvious way of dealing with the problem. Although that means May is obvious at first unless you ' re Dutch. Although that method might not be obvious, unless you're Dutch. (the author of Python, Guido, is a Dutch man, and this is a tribute) Now is better than never. It is better to start than never to begin. Although never is often better than *right* now. It's always better to start than rush.

If the implementation is hard to explain, it's a bad idea. Assuming that the program implementation is very difficult to explain, then it is a terrible thought. If the implementation is simple to explain, it can be a good ideas. Assuming the program implementation is easily explained, it might be a good idea.

Namespaces is one honking great idea – let's do a more of the those! namespace is a great thought and lets us take advantage of it.


the "path to Python" emphasizes aesthetics, simplicity, readability, and usefulness, rejecting complexity or ambiguity.

A way into python deep like the sea--python

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.