]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-72406: Document argument ordering in argparse help output (GH-148534) ... 3.14
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 14 Apr 2026 17:42:10 +0000 (19:42 +0200)
committerGitHub <noreply@github.com>
Tue, 14 Apr 2026 17:42:10 +0000 (10:42 -0700)
gh-72406: Document argument ordering in argparse help output (GH-148534)
(cherry picked from commit 4286227308ee8dafc867062df4cad73af2a84696)

Co-authored-by: Santi Hernandez <santi@santihdzs.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
Doc/library/argparse.rst

index bc36a2933aa31484999badb176dc5aefed53b03a..67d5cd87101b42e092d4dcda65a23efaa6f07436 100644 (file)
@@ -1996,6 +1996,9 @@ Argument groups
    Note that any arguments not in your user-defined groups will end up back
    in the usual "positional arguments" and "optional arguments" sections.
 
+   Within each argument group, arguments are displayed in help output in the
+   order in which they are added.
+
    .. deprecated-removed:: 3.11 3.14
       Calling :meth:`add_argument_group` on an argument group now raises an
       exception. This nesting was never supported, often failed to work