
New submission from Steven Bethard steven.bethard@gmail.com:
[From http://code.google.com/p/argparse/issues/detail?id=61]
It should be documented clearly that only the arguments present on the parent parser at the time ArgumentParser is called will be included in the parser.
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 report@bugs.python.org http://bugs.python.org/issue9343 _______________________________________