zen of python(mas ficil)

Accoring to the zen of python, I conclude it into two parts:

First: The simper the better

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.

Second: understand your code and let others understand easily with your comments

Special cases aren’t special enough to break the rules.

Errors should never pass silently.

Unless explicitly silenced.

In the face of ambiguity, refuse the temptation to guess.

If the implementation is hard to explain, it’s a bad idea.

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

Namespaces are one honking great idea — let’s do more of those!

Published by narutolu

I am from Shanghai ,China.My home university is Shanghai univeristy of Finanace and Economics and I am major in economics and taxation. I worked in mckinsey consulting firm, Nielson and Ipsos. My hobby is programming and travelling . I have been to more than 40 countries.

Leave a comment

Design a site like this with WordPress.com
Get started