Zen of Python the Zen of Python

Source: Internet
Author: User

>>>Importthisthe Zen of Python, by Tim petersbeautiful isbetter than ugly. Explicit isbetter than implicit. Simple isBetter than Complex.complex isbetter than complicated. Flat isbetter than nested. Sparse isbetter than dense. Readability counts. Special cases aren'T special enough to break the rules.Although practicality beats purity. Errors should neverPasssilently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- andPreferably only one--obvious-do it. Although that, may notBe obvious at first unless're Dutch.Now isbetter than never. Although never isOften better than *right*Now . If the implementation isHard to explain, it's a bad idea.If the implementation isEasy to explain, it is a good idea. Namespaces is one honking great idea-Let's do more than those!

except:pass  style code) when there are many possibilities, do not try to guess but try to find one, preferably the only obvious solution (if not sure, use the poor lifting method) Although this is not easy, because you are not Python The father (Dutch here refers to Guido) may be better than not to do, but it's better not to do it without thinking about it (before you start) If you can't describe your plan to someone, it's certainly not a good idea; and vice versa (the scheme evaluation standard) namespace is a wonderful concept, We should make more use of (advocacy and call)

Zen of Python the Zen of 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.