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 Leonid Ilyevsky, paul.j3, rhettinger
Date 2020-04-28.15:50:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588089018.59.0.269581028155.issue40420@roundup.psfhosted.org>
In-reply-to
Content
The display of the choices has been discussed in previous issues.  When the choices is long there isn't a clean way of handling the display.

I'd suggest using a 'metavar' to show a short value, and then enumerate the choices in the help text.  Use the 'Raw' help formatter to handle newlines as desired.

Choices get displayed in 3 places - the usage, the help, and error messages.  Metavar replaces 2 of those.

An alternative to choices is a custom 'type' function.  An example would be all integers between 0 and 100.  Choices would work, but make a poor display regardless of formatting.
History
Date User Action Args
2020-04-28 15:50:18paul.j3setrecipients: + paul.j3, rhettinger, Leonid Ilyevsky
2020-04-28 15:50:18paul.j3setmessageid: <1588089018.59.0.269581028155.issue40420@roundup.psfhosted.org>
2020-04-28 15:50:18paul.j3linkissue40420 messages
2020-04-28 15:50:18paul.j3create