Navigation
- index
- modules |
- Python »
- 3.16.0a2 documentation »
this— The Zen of Python- |
- Theme |
this — The Zen of Python¶
PEP 20 – The Zen of Python, by Tim Peters (RIP).
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!
In Memoriam: Tim Peters 1952-2026.
Usage¶
$ python3 -m this
Table of Contents
This page
«Navigation
- index
- modules |
- Python »
- 3.16.0a2 documentation »
this— The Zen of Python- |
- Theme |
This page is licensed under the Python Software Foundation License Version 2.
Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
See History and License for more information.
The Python Software Foundation is a non-profit corporation. Please donate.
Last updated on Nov 29, 2026 (04:54 UTC). Found a bug?
Created using Sphinx 9.1.1.