Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Embracing the Jokes

00:00 As you might expect from a programming language named after the surreal comedy group Monty Python, Python and its history are full of jokes. In this lesson, you’ll learn about a few of the jokes contained in the Zen of Python.

00:13 In Tim Peters’ original post containing the Zen of Python, he finished with the sentence, “There you go, 20 Pythonic theses,” although the “^H” characters, which represent backspaces, suggest he was about to type “feces” instead of “theses,” which you’ll agree has a very different meaning.

00:34 Not everyone understood Tim’s humor, as a bug-tracking ticket was once opened to fix the dashes on the line, “There should be one—and preferably only one—obvious way to do it.” Tim responded by telling the well-intentioned developer, “I’m afraid you missed the joke,” and proceeded to explain that the mismatched dashes were pointing out how developers disagree about how dashes should be used, and therefore dashes are an example of not having one obvious way to do things.

01:03 As a bonus, the line is also a dig at Perl, a rival language whose motto was, “There is more than one way to do it.”

01:11 The poem goes on to say, “Although that way may not be obvious at first unless you’re Dutch.” The Dutch person being referred to here is Guido van Rossum, the creator of Python who is originally from the Netherlands. Like all good educational content, the Zen of Python contains a few jokes.

01:30 There are plenty more jokes to be discovered throughout Python’s source code and beyond, but to return to a slightly more serious topic, the next lesson will discuss whether Python itself follows the advice set forth in the Zen of Python.

Become a Member to join the conversation.