Message326046
In your proposed change:
params = dict(vars(action), prog=self._prog)
+ if action.option_strings:
+ params['flag'] = action.option_strings[0]
'params', as I noted earlier already includes the 'dest' and 'option_strings' list.
'option_strings' is already being used in '_format_action_invocation()'. So I don't see why this flag needs to appear again in the help line. Though the user can certainly hard code it into the line when defining the 'add_argument'
e.g.
cmdline.add_argument('--complex-argument', help='format --complex-argument key1=value1,key2=value2')
What's special about the comma-separated key/value input?
A patch/pull-request needs needs documentation, and unittest. It appears to be innocuous from a testing stand point, but good documentation could be problem - it could easily end up being confusing without adding much value.
I propose closing this because I don't think it is needed. |
|
Date |
User |
Action |
Args |
2018-09-21 21:41:29 | paul.j3 | set | recipients:
+ paul.j3, helmsman helmsman |
2018-09-21 21:41:29 | paul.j3 | set | messageid: <1537566089.73.0.956365154283.issue34744@psf.upfronthosting.co.za> |
2018-09-21 21:41:29 | paul.j3 | link | issue34744 messages |
2018-09-21 21:41:29 | paul.j3 | create | |
|