Zen of Python (PEP 20)

On Dec 23, 2015 by digvijayb |

PEP(Python Enhancement Proposal)-20 is the Zen of Python. Written by long time Python developer Tim Peters, the Zen is acknowledged as the core philosophy of Python. In fact, it is always accessible in any Python environment by using import this:

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.
Special cases aren’t special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one -and preferably only
one -obvious way to do it.
Although that way may not be obvious at first
unless you’re Dutch.
Now is better than never.
Although never is often better than *right* now.
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!

What is PEP?

Python’s development is conducted largely through the Python Enhancement Proposal (PEP) process. The PEP process is the primary mechanism for proposing major new features, for collecting community input on an issue, and for documenting the design decisions that have gone into Python. Outstanding PEPs are reviewed and commented upon by the Python community and by Van Rossum, the Python project’s benevolent dictator for life.

PEP-8 - the Python style guide

Python has its own style guide known as PEP8 that outlines various guidelines that are good to follow. In fact, you must follow them if you plan to contribute to Python Core. PEP 8 specifies such things as indentation amount, maximum line length, docstrings, whitespace, naming conventions, etc.

Share :

Subscribe & Social

Subscribe to this blog via RSS.

Recent Posts


Java 13

Python 2

Wordpress 1

Ops 3

Shared 3

Angular 1

Web 1

Popular Tags

Java (13) Python (2) Wordpress (1) Ops (3) Angular (1) Web (1)


DGStack is web blog by digvijay bhakuni. This blog is about computer programming tips and trick. And some short tutorial and gettings started post about the framework, libriay, api and much more. The blog target mostly open source stuff like java, j2ee, nodeJs, angularJs, spring, struts, mongodb, mean, etc


This website claims no credit for any images posted on this site unless otherwise noted. Images on this blog are copyright to its respectful owners. If there is an image appearing on this blog that belongs to you and do not wish for it appear on this site, please E-mail with a link to said image and it will be promptly removed. And the information is best of my knowledge one can always write comment or mail regarding information is this blog.