From e9b5b6b506047c5823b5ca50733de92e2007f7c6 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 12 Nov 2026 19:31:21 -0800 Subject: [PATCH 1/5] Add a `this` module doc, with an In Memoriam links --- Doc/library/eastereggs.rst | 9 +++++++++ Doc/library/index.rst | 1 + Doc/library/this.rst | 26 ++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 Doc/library/eastereggs.rst create mode 100644 Doc/library/this.rst diff --git a/Doc/library/eastereggs.rst b/Doc/library/eastereggs.rst new file mode 100644 index 000000000000000..0277e54162e7c6d --- /dev/null +++ b/Doc/library/eastereggs.rst @@ -0,0 +1,9 @@ +.. _eastereggs: + +****************** +Python Easter Eggs +****************** + +.. toctree:: + + this.rst diff --git a/Doc/library/index.rst b/Doc/library/index.rst index 79437d533512b1a..2f9173247528b58 100644 --- a/Doc/library/index.rst +++ b/Doc/library/index.rst @@ -72,6 +72,7 @@ the `Python Package Index `_. windows.rst unix.rst cmdline.rst + eastereggs.rst superseded.rst removed.rst security_warnings.rst diff --git a/Doc/library/this.rst b/Doc/library/this.rst new file mode 100644 index 000000000000000..84b1900527c9789 --- /dev/null +++ b/Doc/library/this.rst @@ -0,0 +1,26 @@ +:mod:`!this` --- The Zen of Python +================================== + +:pep:`20` -- The Zen of Python by Tim Peters (RIP). + + | Beautiful is better than ugly. + | Explicit is better than implicit. + | Simple is better than complex. + | Complex is better than complicated. + | Flat is better than nested. + | Sparse is better than dense. + | Readability counts. + | Special cases aren't special enough to break the rules. + | Although practicality beats purity. + | Errors should never pass silently. + | Unless explicitly silenced. + | In the face of ambiguity, refuse the temptation to guess. + | There should be one-\- and preferably only one -\-obvious way to do it. + | Although that way may not be obvious at first unless you're Dutch. + | Now is better than never. + | Although never is often better than *right* now. + | If the implementation is hard to explain, it's a bad idea. + | If the implementation is easy to explain, it may be a good idea. + | Namespaces are one honking great idea -\- let's do more of those! + +`In Memoriam: Tim Peters 1952-2026 `__ From 8c187234cefba4e267e14b6ad70a69de2564add6 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sat, 14 Nov 2026 17:30:10 -0800 Subject: [PATCH 2/5] Make `this` an orphan doc page --- Doc/library/eastereggs.rst | 9 --------- Doc/library/index.rst | 1 - Doc/library/this.rst | 10 ++++++++++ 3 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 Doc/library/eastereggs.rst diff --git a/Doc/library/eastereggs.rst b/Doc/library/eastereggs.rst deleted file mode 100644 index 0277e54162e7c6d..000000000000000 --- a/Doc/library/eastereggs.rst +++ /dev/null @@ -1,9 +0,0 @@ -.. _eastereggs: - -****************** -Python Easter Eggs -****************** - -.. toctree:: - - this.rst diff --git a/Doc/library/index.rst b/Doc/library/index.rst index 2f9173247528b58..79437d533512b1a 100644 --- a/Doc/library/index.rst +++ b/Doc/library/index.rst @@ -72,7 +72,6 @@ the `Python Package Index `_. windows.rst unix.rst cmdline.rst - eastereggs.rst superseded.rst removed.rst security_warnings.rst diff --git a/Doc/library/this.rst b/Doc/library/this.rst index 84b1900527c9789..bf6dfb9ebbd2c34 100644 --- a/Doc/library/this.rst +++ b/Doc/library/this.rst @@ -1,3 +1,5 @@ +:orphan: + :mod:`!this` --- The Zen of Python ================================== @@ -24,3 +26,11 @@ | Namespaces are one honking great idea -\- let's do more of those! `In Memoriam: Tim Peters 1952-2026 `__ + + +Usage +----- + +.. code-block:: shell-session + + $ python3 -m this From a73a395e55c136f7e88ff2c61ea607b8143498a4 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 16 Nov 2026 18:29:36 -0800 Subject: [PATCH 3/5] Make the `this` module searchable --- Doc/library/this.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Doc/library/this.rst b/Doc/library/this.rst index bf6dfb9ebbd2c34..a565be86ba09320 100644 --- a/Doc/library/this.rst +++ b/Doc/library/this.rst @@ -3,6 +3,12 @@ :mod:`!this` --- The Zen of Python ================================== +.. module:: this + :synopsis: The Zen of Python + +.. + This easter egg module is deliberately missing from the table of contents. + :pep:`20` -- The Zen of Python by Tim Peters (RIP). | Beautiful is better than ugly. From a1baded225afdb4304a2e09a231ba7e497ecae33 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 16 Nov 2026 18:30:12 -0800 Subject: [PATCH 4/5] Update Doc/library/this.rst Co-authored-by: Victor Stinner --- Doc/library/this.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/this.rst b/Doc/library/this.rst index a565be86ba09320..065e560a9e6ef10 100644 --- a/Doc/library/this.rst +++ b/Doc/library/this.rst @@ -9,7 +9,7 @@ .. This easter egg module is deliberately missing from the table of contents. -:pep:`20` -- The Zen of Python by Tim Peters (RIP). +:pep:`20` -- The Zen of Python, by Tim Peters (RIP). | Beautiful is better than ugly. | Explicit is better than implicit. From c0e49f2a92f7cd72721aa4b361624580262c02cc Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 16 Nov 2026 18:30:40 -0800 Subject: [PATCH 5/5] Update Doc/library/this.rst Co-authored-by: Victor Stinner --- Doc/library/this.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/this.rst b/Doc/library/this.rst index 065e560a9e6ef10..2893d5584addc4b 100644 --- a/Doc/library/this.rst +++ b/Doc/library/this.rst @@ -31,7 +31,7 @@ | If the implementation is easy to explain, it may be a good idea. | Namespaces are one honking great idea -\- let's do more of those! -`In Memoriam: Tim Peters 1952-2026 `__ +`In Memoriam: Tim Peters 1952-2026 `__. Usage