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 Colin Morris
Recipients Colin Morris
Date 2016-05-29.16:39:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1464539974.48.0.860363682331.issue27153@psf.upfronthosting.co.za>
In-reply-to
Content
Small example:

    import argparse
    parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
    parser.add_argument('--no-foo', dest='foo', action='store_false', help="Suppress foo")
    args = parser.parse_args()
    print('foo = {}'.format(args.foo))

Output with "-h":

optional arguments:
  -h, --help  show this help message and exit
  --no-foo    Suppress foo (default: True)

A reasonable person reading that would think that we suppress foo by default. But actually, foo is True by default - "--no-foo" is off by default. I would suggest that if action='store_false', the default value reported by the formatter should be flipped.
History
Date User Action Args
2016-05-29 16:39:34Colin Morrissetrecipients: + Colin Morris
2016-05-29 16:39:34Colin Morrissetmessageid: <1464539974.48.0.860363682331.issue27153@psf.upfronthosting.co.za>
2016-05-29 16:39:34Colin Morrislinkissue27153 messages
2016-05-29 16:39:34Colin Morriscreate