From: Gilles Peiffer Date: Sat, 6 Sep 2025 20:53:49 +0000 (+0200) Subject: Docs: Fix typo in `random_derangement` recipe (GH-138599) X-Git-Tag: v3.15.0a1~464 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c117b033856ab7873972ec27bc1bfd2e1868bd47;p=thirdparty%2FPython%2Fcpython.git Docs: Fix typo in `random_derangement` recipe (GH-138599) --- diff --git a/Doc/library/random.rst b/Doc/library/random.rst index e9cebf46d57b..4e55e301b890 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)