mirror of https://github.com/python/cpython
Issue #9343: Document that argparse parent parsers must be configured before their children.
This commit is contained in:
parent
d8ad68f34c
commit
d186f99d00
|
@ -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
|
||||
^^^^^^^^^^^^^^^
|
||||
|
|
Loading…
Reference in New Issue