New submission from Amnon Harel <amnon.ha...@cern.ch>: argparse's help messages for variables that use "store_const" can probably be improved: - propagate the default to all the options - mark the default option as such explicitly - group the keywords that have the same destination together (?) - place the default option first (?)
For example, wouldn't the attached .py be better served with a help message that looks like: ... optional arguments: -h, --help show this help message and exit -w, --wrench use a wrench (default) -H, --hammer use a hammer (default: wrench) -s, --screwdriver use a screwdriver (default: wrench) -T, --tnt just blow the whole thing up (default: wrench) --foo FOO foo bar (default: None) ? ---------- components: Library (Lib) files: demo.py messages: 157554 nosy: Amnon.Harel priority: normal severity: normal status: open title: Suggestion to improve argparse's help messages for "store_const" type: enhancement versions: Python 2.7 Added file: http://bugs.python.org/file25129/demo.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14504> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com