https://github.com/python/cpython/commit/4286227308ee8dafc867062df4cad73af2a84696
commit: 4286227308ee8dafc867062df4cad73af2a84696
branch: main
author: Santi Hernandez <[email protected]>
committer: savannahostrowski <[email protected]>
date: 2026-04-14T16:24:16Z
summary:

gh-72406: Document argument ordering in argparse help output (#148534)

Co-authored-by: Savannah Ostrowski <[email protected]>

files:
M Doc/library/argparse.rst

diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index 0091bf95f0cef0..e37afd6d0b6d5a 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -2032,6 +2032,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

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to