This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Diego Costantini
Recipients Diego Costantini, docs@python
Date 2017-04-21.13:20:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1492780852.4.0.162539678149.issue30127@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-04-21 13:20:52Diego Costantinisetrecipients: + Diego Costantini, docs@python
2017-04-21 13:20:52Diego Costantinisetmessageid: <1492780852.4.0.162539678149.issue30127@psf.upfronthosting.co.za>
2017-04-21 13:20:52Diego Costantinilinkissue30127 messages
2017-04-21 13:20:52Diego Costantinicreate