bpo-45587: Distinguish title and description arguments from **kwargs in add_argument_group methods#29192
bpo-45587: Distinguish title and description arguments from **kwargs in add_argument_group methods#29192jb2170 wants to merge 3 commits intopython:mainfrom
Conversation
MaxwellDupre
left a comment
There was a problem hiding this comment.
Ran 1672 tests in 9.180s
OK
Docs looks ok too.
|
Updated branch to kick off a new test run. @rhettinger You approved this back in May. Any reason not to merge it? |
iritkatriel
left a comment
There was a problem hiding this comment.
The docs build failed:
Error: ../Misc/NEWS.d/next/Library/2021-10-23-14-08-59.bpo-45587.1-DdhN.rst:2: default role used (hint: for inline literals, use double backticks) (default-role)
|
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 |
b21817d to
5fa5983
Compare
|
Thanks for making the requested changes! @iritkatriel, @rhettinger: please review the changes made to this pull request. |
…ment_group methods This is in keeping with the existing documentation that shows add_argument_group to take two keyword arguments, title and description
5fa5983 to
9d73bc7
Compare
|
Thanks for making the requested changes! @rhettinger, @iritkatriel: please review the changes made to this pull request. |
|
Closed due to inactivity |


Hi, this adds clarity to the
add_argument_groupmethod within theargparsemodule by separating the importanttitleanddescriptionkeyword arguments from the other**kwargs.The method signature has been changed from
add_argument_group(self, *args, **kwargs)toadd_argument_group(self, title=None, description=None, **kwargs)Observe that
*argshas been removed; it was never used. This is a backwards compatible change as any code that uses egparser.add_argument_group('myTitle', 'myDescription')will fill out the first two correct keyword arguments, which was already the existing behaviour.The documentation has been made consistent to these changes.
https://bugs.python.org/issue45587