Message268405
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 alternative. You can still display the choices in the body of the help message, either as an explicit list or with the `%(choices)s` string. The long choices list will still appear in the error messages.
There are other bug/issues about formatting the choices list.
I have participated in discussions about replacing
-f FOO, --foo FOO etc
with
-f/--foo FOO etc
I'm sure that's been raised on Stackoverflow, but there might also be a bug/issue on the topic. I'd have to do some search to find those. I believe it can addressed with a HelpFormatter subclass that changes one method. |
|
Date |
User |
Action |
Args |
2016-06-12 23:17:58 | paul.j3 | set | recipients:
+ paul.j3, bethard, memeplex |
2016-06-12 23:17:58 | paul.j3 | set | messageid: <1465773478.38.0.158194408127.issue27303@psf.upfronthosting.co.za> |
2016-06-12 23:17:58 | paul.j3 | link | issue27303 messages |
2016-06-12 23:17:58 | paul.j3 | create | |
|