New submission from Raymond Hettinger <raymond.hettin...@gmail.com>:
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 ---------- components: Library (Lib) messages: 165331 nosy: rhettinger priority: normal severity: normal status: open title: Argparse required arguments incorrectly displayed as optional arguments type: behavior versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15336> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com