https://github.com/python/cpython/commit/c117b033856ab7873972ec27bc1bfd2e1868bd47
commit: c117b033856ab7873972ec27bc1bfd2e1868bd47
branch: main
author: Gilles Peiffer <[email protected]>
committer: ZeroIntensity <[email protected]>
date: 2025-09-06T16:53:49-04:00
summary:
Docs: Fix typo in `random_derangement` recipe (GH-138599)
files:
M Doc/library/random.rst
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index e9cebf46d57b01..4e55e301b89095 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -666,7 +666,7 @@ or the :pypi:`more-itertools` project:
"Choose a permutation where no element is in its original position."
seq = tuple(iterable)
if len(seq) < 2:
- raise ValueError('derangments require at least two values')
+ raise ValueError('derangements require at least two values')
perm = list(seq)
while True:
random.shuffle(perm)
_______________________________________________
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]