Easter eggs and hidden jokes in Python

Despite being a serious language, Python is full of Easter eggs and hidden references to persons and the language itself. Below are a few commonly found around forums.

Braces instead of white-space indentation

Python is designed to use white-space for indentation. The braces library were supposed to change this and bring back C-style indentation. Honestly I would love it, but as of now this is what Python returns.

Hidden poetry

Introduced in PEP20. This poem by Tim Peters, called The Zen of Python, a collection of 20 software principles that influences the design of Python.

Obfuscation of a poetry

This is how the this.py module referenced in the above ‘Hidden Poetry’ Easter-egg looks. The code that unobfuscates it is at the end.


This Easter-egg in Python is the antigravity one, which redirects to a xkcd strip.

BDFL Retirement

Released as a April fool joke in reference to the retirement of Guido van Rossum, aka BDFLPEP401 – one of the official acts was to reinstate the <> comparison operator which existed in Python 2 and was removed in Python 3. Guido’s successor was chosen as Barry Warsaw, affectionately known as Uncle Barry – Friendly Language Uncle For Life (FLUFL).