[issue27303] [argparse] Unify options in help output

2016-06-12 Thread Memeplex
Memeplex added the comment: Thank you for the tips, Paul. The issue is related to the default behavior but it's always good to know about handy workarounds and extensibility hooks. -- ___ Python tracker __

[issue27303] [argparse] Unify options in help output

2016-06-12 Thread paul j3
paul j3 added the comment: http://stackoverflow.com/questions/18275023/dont-show-long-options-twice-in-print-help-from-argparse Once answer demonstrates how to change the Formatter: class CustomHelpFormatter(argparse.HelpFormatter): def _format_action_invocation(self, action): if no

[issue27303] [argparse] Unify options in help output

2016-06-12 Thread paul j3
paul j3 added the comment: There are 2 issues here - - how to make the 'choices' list most compact - how to make the multiple option strings display (long and short) more compact, regardless of why the argument part is long. When the choices display is too long, 'metavar' is a handy alternat

[issue27303] [argparse] Unify options in help output

2016-06-12 Thread SilentGhost
Changes by SilentGhost : -- versions: +Python 3.6 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue27303] [argparse] Unify options in help output

2016-06-12 Thread Memeplex
Changes by Memeplex : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue27303] [argparse] Unify options in help output

2016-06-12 Thread Memeplex
New submission from Memeplex: Currently when you specify more than one name for an option (typically short and long versions) each name is listed with its entire arg list. This is annoying for options taking many args or choices, for example: --type {html,pdf,github,blogger}, -t {html,pdf,g