71
votes

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.)

3
  • 6
    "If it's hard, you're doing it wrong." No, wait, that's mine. Commented Dec 21, 2010 at 22:20
  • 1
    "Lists are more fun when they're left to the imagination."
    – Cerin
    Commented Apr 12, 2011 at 21:56
  • 3
    Python leaves out the closing aphorism just like it leaves out the closing braces or END keyword or what-have-you. (So number 20 is actually one of the nicest ones.) Commented Feb 23, 2015 at 14:38

9 Answers 9

46
votes

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 :-) ).

0
16
votes

It has to be SIGNIFICANT WHITESPACE, of course!

2
  • 3
    In that case, it is written down: The blank line in import this between the title/author and the list of aphorisms.
    – dan04
    Commented Dec 21, 2010 at 23:33
  • It is written in nonprintable characters.
    – Geoffrey
    Commented Dec 21, 2010 at 23:43
12
votes

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.

10
votes

Rule number 20: there is no rule #20.

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

3
  • 1
    I think you're joking, but with programmers, you can never be sure. :-)
    – Steve Tjoa
    Commented Dec 21, 2010 at 22:27
  • 4
    What's this "joking" thing you're talking about? Commented Dec 21, 2010 at 22:28
  • Heh! Yeah, forget what I said.
    – Steve Tjoa
    Commented Dec 21, 2010 at 22:28
8
votes

I suggest that it is PEP 20. Very zen.

7
votes

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

2
  • 3
    Very curious! I wonder why Guido didn't mention this to me when I asked him. I have my own answer (based on WoG) currently selected as the accepted answer. The two answers aren't even inconsistent with each other, really! I'm obviously inherently conflicted on this, but I think I will leave the accepted answer as-is for now, barring him writing at greater length on the question than a single tweet without any commentary. Commented Jun 19, 2020 at 23:17
  • I just referred to the email exchange where Tim peters left that comment (".. counting the one I'm leaving for Guido to fill in"). But yes, you are right, the two answers aren't even inconsistent. The unwritten aphorism allows everyone to provide their own version and engage with the list. Commented Jun 21, 2020 at 10:27
4
votes

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".

2
votes

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

0
1
vote

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".

Not the answer you're looking for? Browse other questions tagged or ask your own question.