Zen of Python: Difference between revisions

Content deleted Content added
Principles: Add code readability Wikilink
Principles: Add more Wikipedia links and add clarifying footnote regarding lack of explicit links in original Zen of Python
Line 28:
==Principles==
[[File:The_Zen_of_Python_illustrated.png|thumb|The Zen of Python illustrated]]
The principles are listed as follows:{{efn|Wikipedia links below are added for further reference and understanding, and were not explicitly linked in the Zen of Python}}
 
<blockquote style="text-indent:-2ex;padding-left:4ex;">
Line 34:
* Beautiful is better than ugly.
* Explicit is better than implicit.
* [[KISS_principle|Simple]] is better than complex.
* Complex is better than complicated.
* Flat is better than nested.
* [[Minimalism#Design,_architecture,_and_spaces|Sparse]] is better than dense.
* [[Computer_programming#Readability_of_source_code|Readability]] counts.
* [[Edge_case|Special cases]] aren't special enough to break the rules.
* Although [[Perfect_is_the_enemy_of_good|practicality]] beats purity.
* Errors should never pass silently.
* Unless explicitly silenced.
* In the face of [[Ambiguity_aversion|ambiguity]], refuse the temptation to guess.
* There should be one-- and preferably only one --obvious way to do it.{{efn|The formatting of the [[Dash|dashes]] in this line and the final is purposely inconsistent, in reference to the varying formatting conventions.<ref>{{Cite web|last=|first=|date=|title=Issue 3364: An ortographical typo in Zen of Python text - Python tracker|url=https://bugs.python.org/issue3364|archive-url=|archive-date=|access-date=2021-02-10|website=}}</ref>}}
* Although that way may not be obvious at first unless you're Dutch.
Line 50:
* 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&nbsp;– let's do more of those!
}}
</blockquote>