Message111306
[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 |
|
Date |
User |
Action |
Args |
2010-07-23 12:57:27 | bethard | set | recipients:
+ bethard, docs@python |
2010-07-23 12:57:27 | bethard | set | messageid: <1279889847.13.0.579699796707.issue9343@psf.upfronthosting.co.za> |
2010-07-23 12:57:25 | bethard | link | issue9343 messages |
2010-07-23 12:57:25 | bethard | create | |
|