This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.j3
Recipients helmsman helmsman, paul.j3
Date 2018-09-21.21:41:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1537566089.73.0.956365154283.issue34744@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-09-21 21:41:29paul.j3setrecipients: + paul.j3, helmsman helmsman
2018-09-21 21:41:29paul.j3setmessageid: <1537566089.73.0.956365154283.issue34744@psf.upfronthosting.co.za>
2018-09-21 21:41:29paul.j3linkissue34744 messages
2018-09-21 21:41:29paul.j3create