Message292044
Here https://docs.python.org/2/library/argparse.html#action we have the following:
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--foo', action='store_true')
>>> parser.add_argument('--bar', action='store_false')
>>> parser.add_argument('--baz', action='store_false')
>>> parser.parse_args('--foo --bar'.split())
Namespace(bar=False, baz=True, foo=True)
baz should be False because omitted.
I also tested it. |
|
Date |
User |
Action |
Args |
2017-04-21 13:20:52 | Diego Costantini | set | recipients:
+ Diego Costantini, docs@python |
2017-04-21 13:20:52 | Diego Costantini | set | messageid: <1492780852.4.0.162539678149.issue30127@psf.upfronthosting.co.za> |
2017-04-21 13:20:52 | Diego Costantini | link | issue30127 messages |
2017-04-21 13:20:52 | Diego Costantini | create | |
|