summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorDongGeon Lee <secmatth1996@gmail.com>2022-02-15 00:02:21 (GMT)
committerGitHub <noreply@github.com>2022-02-15 00:02:21 (GMT)
commit278fdd3e3a2492665b2c2888fd2f428f7f59a3f5 (patch)
tree8b9e8414ed3235b073e34c379018a7356c9dc2f6 /Modules
parent1d9036425e811f2c6c231fbc54159f9e82f91470 (diff)
downloadcpython-278fdd3e3a2492665b2c2888fd2f428f7f59a3f5.zip
cpython-278fdd3e3a2492665b2c2888fd2f428f7f59a3f5.tar.gz
cpython-278fdd3e3a2492665b2c2888fd2f428f7f59a3f5.tar.bz2
bpo-46728: fix docstring of combinations_with_replacement for consistency (GH-31293)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/clinic/itertoolsmodule.c.h4
-rw-r--r--Modules/itertoolsmodule.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/Modules/clinic/itertoolsmodule.c.h b/Modules/clinic/itertoolsmodule.c.h
index 7f5abe6..6a69980 100644
--- a/Modules/clinic/itertoolsmodule.c.h
+++ b/Modules/clinic/itertoolsmodule.c.h
@@ -414,7 +414,7 @@ PyDoc_STRVAR(itertools_combinations_with_replacement__doc__,
"\n"
"Return successive r-length combinations of elements in the iterable allowing individual elements to have successive repeats.\n"
"\n"
-"combinations_with_replacement(\'ABC\', 2) --> AA AB AC BB BC CC\"");
+"combinations_with_replacement(\'ABC\', 2) --> (\'A\',\'A\'), (\'A\',\'B\'), (\'A\',\'C\'), (\'B\',\'B\'), (\'B\',\'C\'), (\'C\',\'C\')");
static PyObject *
itertools_combinations_with_replacement_impl(PyTypeObject *type,
@@ -667,4 +667,4 @@ skip_optional_pos:
exit:
return return_value;
}
-/*[clinic end generated code: output=5364de2e143609b9 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5cb14d4a3fe8aeec input=a9049054013a1b77]*/
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 0ec65d5..4a7a957 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -2924,14 +2924,14 @@ itertools.combinations_with_replacement.__new__
r: Py_ssize_t
Return successive r-length combinations of elements in the iterable allowing individual elements to have successive repeats.
-combinations_with_replacement('ABC', 2) --> AA AB AC BB BC CC"
+combinations_with_replacement('ABC', 2) --> ('A','A'), ('A','B'), ('A','C'), ('B','B'), ('B','C'), ('C','C')
[clinic start generated code]*/
static PyObject *
itertools_combinations_with_replacement_impl(PyTypeObject *type,
PyObject *iterable,
Py_ssize_t r)
-/*[clinic end generated code: output=48b26856d4e659ca input=dc2a8c7ba785fad7]*/
+/*[clinic end generated code: output=48b26856d4e659ca input=1dc58e82a0878fdc]*/
{
cwrobject *co;
Py_ssize_t n;