paul j3 added the comment: The ''_expand_help' method formats one action (argument) at a time, so it could issue an error message that includes that action's name.
The disconnect that you noticed arises because your bad 'help' parameter wasn't tested until is was used in a 'print_help'. http://bugs.python.org/issue9849 asks for better testing of `nargs` (and `metavar`) values. In the proposed patch, 'add_argument' creates a temporary HelpFormatter and tries to format a relevant portion of the help. I suppose that test could be extended to test the 'help' parameter as well. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21666> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com