diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2023-03-16 14:32:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-16 14:32:18 (GMT) |
commit | b0ec6253c9cf1b22b87cd99f317dbaeb31263b20 (patch) | |
tree | 6273916f63beb398562d23aaa63c58215df1c4ab | |
parent | a297d59609038ccfc3bdf6f350e8401f07b0a931 (diff) | |
download | cpython-b0ec6253c9cf1b22b87cd99f317dbaeb31263b20.zip cpython-b0ec6253c9cf1b22b87cd99f317dbaeb31263b20.tar.gz cpython-b0ec6253c9cf1b22b87cd99f317dbaeb31263b20.tar.bz2 |
GH-102653: Make recipe docstring show the correct distribution (#102742)
-rw-r--r-- | Doc/library/random.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/random.rst b/Doc/library/random.rst index 4522f5a..098684d 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)) |