| FazBrowse Wikipedia Viewer | Main Page | | |
| Viewing: https://en.wikipedia.org/wiki/Zen_of_Python |
The Zen of Python is a collection of 19 "guiding principles" for writing computer programs that influence the design of the Python programming language. Python code that aligns with these principles is often referred to as "Pythonic".
Software engineer Tim Peters wrote this set of principles and posted it on the Python mailing list in 1999. Peters' list left open a 20th principle "for Guido to fill in", referring to Guido van Rossum, the original author of the Python language. The vacancy for a 20th principle has not been filled.
Peters' Zen of Python was included as entry number 20 in the language's official Python Enhancement Proposals and was released into the public domain. It is also included as an Easter egg in the Python interpreter, where it can be displayed by entering
One of the principles, "There should be one-- and preferably only one --obvious way to do it", can be referenced as the "Pythonic" way. The official definition of "Pythonic" is:
An idea or piece of code which closely follows the most common idioms of the Python language, rather than implementing code using concepts common to other languages. For example, a common idiom in Python is to loop over all elements of an iterable using a for statement. Many other languages don’t have this type of construct, so people unfamiliar with Python sometimes use a numerical counter instead:
Peters, Tim (June 4, 1999). "The Python Way". Python Software Foundation. Retrieved March 26, 2019.1 2 Warsaw, Barry (23 May 2020). The Zen of Python. YouTube. The Zbwedicon. Archived from the original on 2021-12-11. Archived 2020-06-03 at the Wayback Machine ↑ "Code Style – The Hitchhiker's Guide to Python". docs.python-guide.org. Archived from the original on 27 January 2021. Retrieved 20 January 2021. ↑
View original on Wikipedia | Back | FazBrowse Home