]> granicus.if.org Git - python/commitdiff
Issue #9343: Document that argparse parent parsers must be configured before their...
authorSteven Bethard <steven.bethard@gmail.com>
Sat, 26 Mar 2011 20:49:00 +0000 (21:49 +0100)
committerSteven Bethard <steven.bethard@gmail.com>
Sat, 26 Mar 2011 20:49:00 +0000 (21:49 +0100)
Doc/library/argparse.rst
Misc/NEWS

index 102b3e9302542eb53ab16bc8e7d6b225890b429d..2164ec004e5d4e0c43f4f9d17f32bd031b5dcf12 100644 (file)
@@ -351,6 +351,11 @@ Note that most parent parsers will specify ``add_help=False``.  Otherwise, the
 :class:`ArgumentParser` will see two ``-h/--help`` options (one in the parent
 and one in the child) and raise an error.
 
+.. note::
+   You must fully initialize the parsers before passing them via ``parents=``.
+   If you change the parent parsers after the child parser, those changes will
+   not be reflected in the child.
+
 
 formatter_class
 ^^^^^^^^^^^^^^^
index 4638fd7791712b152a5b2138cfa070b8477b18b7..babee78ead2b46d84e7adfcbb383ca9de0b238c8 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -162,6 +162,9 @@ Library
 
 - Issue #8982: Improve the documentation for the argparse Namespace object.
 
+- Issue #9343: Document that argparse parent parsers must be configured before
+  their children.
+
 Build
 -----