cpython (merge 3.2 -> default): Issue #9343: Document that argparse parent parsers must be configured before
http://hg.python.org/cpython/rev/8bdc20468cbc changeset: 68988:8bdc20468cbc parent: 68985:2d6745f219b3 parent: 68986:d288666c1d58 user: Steven Bethard <steven.bethard@gmail.com> date: Sat Mar 26 21:51:56 2011 +0100 summary: Issue #9343: Document that argparse parent parsers must be configured before their children. (Merge from 3.2.) files: Doc/library/argparse.rst | 5 +++++ Misc/NEWS | 3 +++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -351,6 +351,11 @@ :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 ^^^^^^^^^^^^^^^ diff --git a/Misc/NEWS b/Misc/NEWS --- a/Misc/NEWS +++ b/Misc/NEWS @@ -304,6 +304,9 @@ - Issue #8982: Improve the documentation for the argparse Namespace object. +- Issue #9343: Document that argparse parent parsers must be configured before + their children. + Build ----- -- Repository URL: http://hg.python.org/cpython
participants (1)
-
steven.bethard