Skip to content

Commit b0ec625

Browse files
authored
GH-102653: Make recipe docstring show the correct distribution (#102742)
1 parent a297d59 commit b0ec625

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
@@ -610,7 +610,8 @@ from the combinatoric iterators in the :mod:`itertools` module:
610610
return tuple(pool[i] for i in indices)
611611

612612
def random_combination_with_replacement(iterable, r):
613-
"Random selection from itertools.combinations_with_replacement(iterable, r)"
613+
"Choose r elements with replacement. Order the result to match the iterable."
614+
# Result will be in set(itertools.combinations_with_replacement(iterable, r)).
614615
pool = tuple(iterable)
615616
n = len(pool)
616617
indices = sorted(random.choices(range(n), k=r))

0 commit comments

Comments
 (0)