Skip to content

Commit 7d4ea57

Browse files
pythongh-72406: Document argument ordering in argparse help output (python#148534)
Co-authored-by: Savannah Ostrowski <savannah@python.org> (cherry picked from commit 4286227)
1 parent 5a4143a commit 7d4ea57

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Doc/library/argparse.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,6 +1888,9 @@ Argument groups
18881888
Note that any arguments not in your user-defined groups will end up back
18891889
in the usual "positional arguments" and "optional arguments" sections.
18901890

1891+
Within each argument group, arguments are displayed in help output in the
1892+
order in which they are added.
1893+
18911894
.. versionchanged:: 3.11
18921895
Calling :meth:`add_argument_group` on an argument group is deprecated.
18931896
This feature was never supported and does not always work correctly.

0 commit comments

Comments
 (0)