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!

Advertisements

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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website at WordPress.com
Get started
%d bloggers like this: