ThatXliner <bryan.hu.2...@gmail.com> added the comment:
> So if you can get by with just customizing _format_action_invocation, there's > no need for further action here. Then maybe we could just make a new function that takes 2 arguments: Name of another action class (or the action class itself), and a tuple of the arg names to be displayed. It returns a new action class that contains the help text properties of the given action class with customized displayed arg names. Maybe like parser.add_argument("-f", "--foo", action=argparse.CustomArgName(action="store_true", name=("-F!!", "--FOO!"), help="TO foo a bar")) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42023> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com