]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Docs: replace Harry Potter reference with Monty Python (GH-118130) (#118135)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 21 Apr 2024 18:10:15 +0000 (20:10 +0200)
committerGitHub <noreply@github.com>
Sun, 21 Apr 2024 18:10:15 +0000 (18:10 +0000)
Docs: replace Harry Potter reference with Monty Python (GH-118130)
(cherry picked from commit 1446024124fb98c3051199760380685f8a2fd127)

Co-authored-by: Clément Robert <cr52@protonmail.com>
Doc/library/doctest.rst

index 9913309a39428fa24d8ef7ef3af36d0fcd3aa41f..694a43f9e035c63124d119da2fa62fa2795c130d 100644 (file)
@@ -800,18 +800,18 @@ guarantee about output.  For example, when printing a set, Python doesn't
 guarantee that the element is printed in any particular order, so a test like ::
 
    >>> foo()
-   {"Hermione", "Harry"}
+   {"spam", "eggs"}
 
 is vulnerable!  One workaround is to do ::
 
-   >>> foo() == {"Hermione", "Harry"}
+   >>> foo() == {"spam", "eggs"}
    True
 
 instead.  Another is to do ::
 
    >>> d = sorted(foo())
    >>> d
-   ['Harry', 'Hermione']
+   ['eggs', 'spam']
 
 There are others, but you get the idea.