[issue9343] Document that argparse "parents" must be fully declared before children
New submission from Steven Bethard
parent = argparse.ArgumentParser(add_help=False) child = argparse.ArgumentParser(parents=[parent]) parent.add_argument('--foo', action='store_true') child.parse_args(['--foo']) usage: [-h] : error: unrecognized arguments: --foo
----------
assignee: docs@python
components: Documentation
messages: 111306
nosy: bethard, docs@python
priority: normal
severity: normal
status: open
title: Document that argparse "parents" must be fully declared before children
versions: Python 2.7, Python 3.2, Python 3.3
_______________________________________
Python tracker
participants (3)
-
Roundup Robot
-
Steven Bethard
-
Éric Araujo