]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-72406: Document argument ordering in argparse help output (GH-148534) ...
authorSavannah Ostrowski <savannah@python.org>
Tue, 14 Apr 2026 17:53:11 +0000 (10:53 -0700)
committerGitHub <noreply@github.com>
Tue, 14 Apr 2026 17:53:11 +0000 (17:53 +0000)
gh-72406: Document argument ordering in argparse help output (#148534)

(cherry picked from commit 4286227308ee8dafc867062df4cad73af2a84696)

Co-authored-by: Santi Hernandez <santi@santihdzs.com>
Doc/library/argparse.rst

index af39724170941d1cf5bd51e25b8f69ecbcaef799..89b9faf9f60d2ad6f3fd55df0810bf966a8dca15 100644 (file)
@@ -1888,6 +1888,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.
+
    .. versionchanged:: 3.11
     Calling :meth:`add_argument_group` on an argument group is deprecated.
     This feature was never supported and does not always work correctly.