Diego Costantini added the comment:
You are right, I misunderstood the part where it sets defaults opposite to the
stored value, although apparently over one year ago I did understand it
correctly when I first went through that documentation.
Today my second pair of eyes had my same understand
Eric V. Smith added the comment:
I think the example is correct. Because baz's action is store_false, the
default is True. So if baz is omitted, it should have a True value. That's what
the example shows, and what I see when I run this code.
Can you show what you tested, what you saw, and what
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('-