https://github.com/python/cpython/commit/1446024124fb98c3051199760380685f8a2fd127
commit: 1446024124fb98c3051199760380685f8a2fd127
branch: main
author: Clément Robert <[email protected]>
committer: barneygale <[email protected]>
date: 2024-04-21T19:03:46+01:00
summary:
Docs: replace Harry Potter reference with Monty Python (#118130)
files:
M Doc/library/doctest.rst
diff --git a/Doc/library/doctest.rst b/Doc/library/doctest.rst
index a643a0e7e313bf..5f7d10a6dce037 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]