[Python-checkins] GH-102653: Make recipe docstring show the correct distribution (GH-102742)
miss-islington
webhook-mailer at python.org
Thu Mar 16 10:42:30 EDT 2023
https://github.com/python/cpython/commit/4a7faac5571eb96202a4725604443c564285ebae
commit: 4a7faac5571eb96202a4725604443c564285ebae
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2023-03-16T07:42:23-07:00
summary:
GH-102653: Make recipe docstring show the correct distribution (GH-102742)
(cherry picked from commit b0ec6253c9cf1b22b87cd99f317dbaeb31263b20)
Co-authored-by: Raymond Hettinger <rhettinger at users.noreply.github.com>
files:
M Doc/library/random.rst
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index c7d94e0680f0..c7620b032843 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -589,7 +589,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))
More information about the Python-checkins
mailing list