New submission from Diego Costantini:
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.
--
assignee: docs@python
components: Documentation
messages: 292044
nosy: Diego Costantini, docs@python
priority: normal
severity: normal
status: open
title: argparse action not correctly describing the right behavior
type: behavior
versions: Python 2.7
___
Python tracker
<http://bugs.python.org/issue30127>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com