diff options
author | Steven Bethard <steven.bethard@gmail.com> | 2011-03-26 20:51:56 (GMT) |
---|---|---|
committer | Steven Bethard <steven.bethard@gmail.com> | 2011-03-26 20:51:56 (GMT) |
commit | b04d70d993d3aec544a8dc552ca1b36e3fae730c (patch) | |
tree | f996f0f3b5bb4799e4588f7886426ffa4853aea7 | |
parent | ff5ee0cfef8b63c221d75af2009a31f6bdde664f (diff) | |
parent | d186f99d00a8f2443774c9d277c9b615aa8b6d6d (diff) | |
download | cpython-b04d70d993d3aec544a8dc552ca1b36e3fae730c.zip cpython-b04d70d993d3aec544a8dc552ca1b36e3fae730c.tar.gz cpython-b04d70d993d3aec544a8dc552ca1b36e3fae730c.tar.bz2 |
Issue #9343: Document that argparse parent parsers must be configured before their children. (Merge from 3.2.)
-rw-r--r-- | Doc/library/argparse.rst | 5 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index da7565c..ebc1360 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -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 ^^^^^^^^^^^^^^^ @@ -304,6 +304,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 ----- |