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 rhettinger
Recipients rhettinger
Date 2012-07-12.19:43:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1342122214.84.0.306915245284.issue15336@psf.upfronthosting.co.za>
In-reply-to
Content
In this script, '-x' is required argument:
------------------------------------------
import argparse
p = argparse.ArgumentParser()
p.add_argument('-x', required=True)
p.print_help()

However, the automatically generated help shows it as optional:
---------------------------------------------------------------
usage: ap_demo.py [-h] -x X

optional arguments:
  -h, --help  show this help message and exit
  -x X
History
Date User Action Args
2012-07-12 19:43:34rhettingersetrecipients: + rhettinger
2012-07-12 19:43:34rhettingersetmessageid: <1342122214.84.0.306915245284.issue15336@psf.upfronthosting.co.za>
2012-07-12 19:43:34rhettingerlinkissue15336 messages
2012-07-12 19:43:33rhettingercreate