https://github.com/python/cpython/commit/6d87cb494ba27ef5c2a4a59240a7ed792bb0bcce commit: 6d87cb494ba27ef5c2a4a59240a7ed792bb0bcce branch: 3.12 author: Miss Islington (bot) <[email protected]> committer: barneygale <[email protected]> date: 2024-04-21T18:10:15Z summary:
[3.12] Docs: replace Harry Potter reference with Monty Python (GH-118130) (#118135) Docs: replace Harry Potter reference with Monty Python (GH-118130) (cherry picked from commit 1446024124fb98c3051199760380685f8a2fd127) Co-authored-by: Clément Robert <[email protected]> files: M Doc/library/doctest.rst diff --git a/Doc/library/doctest.rst b/Doc/library/doctest.rst index 9913309a39428f..694a43f9e035c6 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. _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
