]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.10] bpo-46728: fix docstring of combinations_with_replacement for consistency...
authorDongGeon Lee <secmatth1996@gmail.com>
Tue, 15 Feb 2022 10:24:04 +0000 (19:24 +0900)
committerGitHub <noreply@github.com>
Tue, 15 Feb 2022 10:24:04 +0000 (19:24 +0900)
Modules/clinic/itertoolsmodule.c.h
Modules/itertoolsmodule.c

index 82729eeb56bce9dfa1a02eed2fb708379f987875..d3f54221dd4cf850bdd9f5f13650941ab5c1509f 100644 (file)
@@ -406,7 +406,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,
@@ -658,4 +658,4 @@ skip_optional_pos:
 exit:
     return return_value;
 }
-/*[clinic end generated code: output=889c4afc3b13574f input=a9049054013a1b77]*/
+/*[clinic end generated code: output=c91f57481a2461d3 input=a9049054013a1b77]*/
index 643f47b045046cbfe4fa2ef2743350016200f182..f8e2c45aecadf77d1ad3e924b00b76588dd98d2c 100644 (file)
@@ -2926,14 +2926,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;