From: Raymond Hettinger Date: Thu, 16 Mar 2023 14:32:18 +0000 (-0500) Subject: GH-102653: Make recipe docstring show the correct distribution (#102742) X-Git-Tag: v3.12.0a7~154 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b0ec6253c9cf1b22b87cd99f317dbaeb31263b20;p=thirdparty%2FPython%2Fcpython.git GH-102653: Make recipe docstring show the correct distribution (#102742) --- diff --git a/Doc/library/random.rst b/Doc/library/random.rst index 4522f5a8d26b..098684d7270f 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -610,7 +610,8 @@ from the combinatoric iterators in the :mod:`itertools` module: return tuple(pool[i] for i in indices) def random_combination_with_replacement(iterable, r): - "Random selection from itertools.combinations_with_replacement(iterable, r)" + "Choose r elements with replacement. Order the result to match the iterable." + # Result will be in set(itertools.combinations_with_replacement(iterable, r)). pool = tuple(iterable) n = len(pool) indices = sorted(random.choices(range(n), k=r))