Skip to content

Commit 9730682

Browse files
rhettingerFidget-Spinner
authored andcommitted
pythonGH-102653: Make recipe docstring show the correct distribution (python#102742)
1 parent e3461ea commit 9730682

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/library/random.rst

Lines changed: 2 additions & 1 deletion
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)