New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-46728: fix docstring of combinations_with_replacement for consistency #31293
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
Be sure to re-run the argument clinic so clinic/itertoolsmodule.c.h is updated to match this. |
Please run make clinic
before submitting the patch.
When I ran the command, the following diff is generated.
diff --git a/Modules/clinic/itertoolsmodule.c.h b/Modules/clinic/itertoolsmodule.c.h
index 7f5abe648a..6a69980824 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 347913752b..4a7a957303 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -2931,7 +2931,7 @@ 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;
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
I have made the requested changes; please review again |
Thanks for making the requested changes! @corona10, @rhettinger: please review the changes made to this pull request. |
Thanks @LeeDongGeon1996 for the PR, and @corona10 for merging it |
Sorry, @LeeDongGeon1996 and @corona10, I could not cleanly backport this to |
@corona10 Does it need another PR after cherry-pick? |
…ency (pythonGH-31293) (cherry picked from commit 278fdd3)
…consistency (pythonGH-31293). (cherry picked from commit 278fdd3) Co-authored-by: DongGeon Lee <secmatth1996@gmail.com>
GH-31350 is a backport of this pull request to the 3.10 branch. |
Thanks @LeeDongGeon1996 for the PR, and @corona10 for merging it |
Sorry, @LeeDongGeon1996 and @corona10, I could not cleanly backport this to |
…onsistency (pythonGH-31293). (cherry picked from commit 278fdd3) Co-authored-by: DongGeon Lee <secmatth1996@gmail.com>
GH-31356 is a backport of this pull request to the 3.9 branch. |
combinations_with_replacement
.https://bugs.python.org/issue46728