Message291404
Thanks to Issue 11807, the documentation now lists “metavar”. (However, it looks like a positional argument, rather than keyword-only, and its use seems to be discouraged, but those issues are not specific to “metavar”.)
Some points specific to “metavar” that I think could be clarified:
1. Metavar seems to affect the placeholder in the “usage” message, and a heading that precedes a multi-line list of commands, but it does not affect the presentation of the multi-line list itself.
2. The relationship between the “metavar” parameter of “add_argument” and “add_subparsers” needs clarifying. At the moment, there is a hyperlink, which implies that the description of add_argument’s parameter applies to add_subparsers. But it only discusses the “dest” parameter and CLI options (a.k.a. “optionals”), neither of which make sense in the context of subcommands. Issue 29030 (choices vs metavar) may be related. |
|
Date |
User |
Action |
Args |
2017-04-10 02:42:35 | martin.panter | set | recipients:
+ martin.panter, ncoghlan, bethard, chris.jerdonek, docs@python, tshepang, kushal.das |
2017-04-10 02:42:35 | martin.panter | set | messageid: <1491792155.66.0.645058181651.issue14039@psf.upfronthosting.co.za> |
2017-04-10 02:42:35 | martin.panter | link | issue14039 messages |
2017-04-10 02:42:34 | martin.panter | create | |
|