]> 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:50:38 +0000 (21:50 +0100)
committerSteven Bethard <steven.bethard@gmail.com>
Sat, 26 Mar 2011 20:50:38 +0000 (21:50 +0100)
Doc/library/argparse.rst
Misc/NEWS

index 459647b49c8e6bfe3d9bdcdec93e86b72cf18e35..b34be8af0a42a547058465aa3a517f754426b74d 100644 (file)
@@ -347,6 +347,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 3ed93da78104fa8b87623ac3aaf8fe71bbda34a7..151bc1c48732e47153041f5e1c822853d6ec9d79 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -239,6 +239,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.
+
 Extension Modules
 -----------------