Skip to content

Commit 4a7faac

Browse files
GH-102653: Make recipe docstring show the correct distribution (GH-102742)
(cherry picked from commit b0ec625) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
1 parent 0560fe3 commit 4a7faac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/library/random.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,8 @@ from the combinatoric iterators in the :mod:`itertools` module:
589589
return tuple(pool[i] for i in indices)
590590

591591
def random_combination_with_replacement(iterable, r):
592-
"Random selection from itertools.combinations_with_replacement(iterable, r)"
592+
"Choose r elements with replacement. Order the result to match the iterable."
593+
# Result will be in set(itertools.combinations_with_replacement(iterable, r)).
593594
pool = tuple(iterable)
594595
n = len(pool)
595596
indices = sorted(random.choices(range(n), k=r))

0 commit comments

Comments
 (0)