From: Clément Robert Date: Sun, 21 Apr 2024 18:03:46 +0000 (+0200) Subject: Docs: replace Harry Potter reference with Monty Python (#118130) X-Git-Tag: v3.13.0b1~319 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1446024124fb98c3051199760380685f8a2fd127;p=thirdparty%2FPython%2Fcpython.git Docs: replace Harry Potter reference with Monty Python (#118130) --- diff --git a/Doc/library/doctest.rst b/Doc/library/doctest.rst index a643a0e7e313..5f7d10a6dce0 100644 --- a/Doc/library/doctest.rst +++ b/Doc/library/doctest.rst @@ -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.