The Zen of Python distils the guiding principles for Python into 20 aphorisms but lists only 19. What's the twentieth?


Python Problem Overview

From PEP 20, The Zen of Python:

> Long time Pythoneer Tim Peters succinctly channels the BDFL's > guiding principles for Python's design into 20 aphorisms, only 19 > of which have been written down.

What is this twentieth aphorism? Does it exist, or is the reference merely a rhetorical device to make the reader think?

(One potential answer that occurs to me is that "You aren't going to need it" is the remaining aphorism. If that were the case, it would both exist and act to make the reader think, and it would be characteristically playful, thus fitting the list all the better. But web searches suggest this to be an extreme programming mantra, not intrinsically Pythonic wisdom, so I'm stumped.)

Python Solutions

Solution 1 - Python

I had the opportunity to ask Guido about this recently. According to him, this is "some bizarre Tim Peters in-joke". That, and/or (still according to him) it's an opportunity for people to provide their own addition (as largely is happening in the answers to this question :-) ).

Solution 2 - Python

It has to be SIGNIFICANT WHITESPACE, of course!

Solution 3 - Python

The number of this PEP was intentionally chosen - as PEP index doesn't have to be continuous -leaving Tim with the freedom to choose whatever number he wanted.

Now the question comes to why the number 20 was chosen, if 19 aphorisms were written, why he didn't name his proposal as PEP19? - This is where Zen started to be involved.

In the Zen-fluenced Japanese sushi restaurants, customers have the option to choose Omakase which means "I'll leave it up to you", in return (not typical but sometimes) the sushi chef will ask the customers to choose the last piece of sushi - either exploring a new fish or aftertast-ing a previous one - conceptual-wise it correlates to what @Jeff Walden mentioned in his answer where people have the opportunity to provide their own addition to complete the set.

After all it's all pure speculation.

Solution 4 - Python

Rule number 20: there is no rule #20.

This replaced the old rule #20: "you do not talk about fight club".

Solution 5 - Python

I suggest that it is PEP 20. Very zen.

Solution 6 - Python

20: "You must discover this for yourself, grasshopper."

Solution 7 - Python

20: "There are only 19"

**waves hand**

(jedi mind trick)

Solution 8 - Python

Tim Peters mentions that he left the 20th Aphorism for Guido to fill in, in an email exchange (link posted by Guido van Rossum on twitter).

> "There you go: 20 Pythonic Fec^H^H^HTheses on the nose, counting the one I'm leaving for Guido to fill in"

  • Tim Peters

Source: Python mail link Tweet link

Solution 9 - Python

The 20th principle is a matter of opinion, but my interpretation is that the blank line (right after "The Zen of Python, by Tim Peters") means "Use whitespace".

Solution 10 - Python

20: "Don't forget to drink your Ovaltine"

Solution 11 - Python

PEP 20 : is missing intentionally : which could imply: "keep yourself updated, keep searching for something new" "make your own pep 20"

Solution 12 - Python

In the documentation, the "import this" command is listed as Easter Egg, so it was not written by Tim Peters but it is included in the PEP20 and it adds something not listed in the previous 19 aphorisms, so it must be the case for it to be the 20th. Looking more closely, it is an underlying message for pythonists to have PEP20 in mind when programming with python: "import this ideas".


All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJeff WaldenView Question on Stackoverflow
Solution 1 - PythonJeff WaldenView Answer on Stackoverflow
Solution 2 - PythonGeoffreyView Answer on Stackoverflow
Solution 3 - PythonChen XieView Answer on Stackoverflow
Solution 4 - PythonMusiGenesisView Answer on Stackoverflow
Solution 5 - PythonfbicknelView Answer on Stackoverflow
Solution 6 - PythonHollisterView Answer on Stackoverflow
Solution 7 - PythonConceited CodeView Answer on Stackoverflow
Solution 8 - Pythonnagaraj bhatView Answer on Stackoverflow
Solution 9 - PythonArMaNView Answer on Stackoverflow
Solution 10 - PythonjonesyView Answer on Stackoverflow
Solution 11 - Pythonpython_monkView Answer on Stackoverflow
Solution 12 - PythonMauricio ReisView Answer on Stackoverflow