Skip to content

Commit 4286227

Browse files
gh-72406: Document argument ordering in argparse help output (#148534)
Co-authored-by: Savannah Ostrowski <savannah@python.org>
1 parent 3cb7eae commit 4286227

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
@@ -2032,6 +2032,9 @@ Argument groups
20322032
Note that any arguments not in your user-defined groups will end up back
20332033
in the usual "positional arguments" and "optional arguments" sections.
20342034

2035+
Within each argument group, arguments are displayed in help output in the
2036+
order in which they are added.
2037+
20352038
.. deprecated-removed:: 3.11 3.14
20362039
Calling :meth:`add_argument_group` on an argument group now raises an
20372040
exception. This nesting was never supported, often failed to work

0 commit comments

Comments
 (0)