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 paul.j3, rhettinger, shangxiao, xtreak
Date 2020-11-29.21:22:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1606684959.01.0.720570152233.issue42501@roundup.psfhosted.org>
In-reply-to
Content
choices is fine for a few strings, but quickly becomes awkward with other types and large numbers.  The testing isn't an issue, since it just does a simple `in/contains` test.  But display, whether in usage, help or error, is problematic if you try anything too fancy.  metavar gets around some of those issues, but doesn't change the error messages.

Custom type or action is the best alternative.

I'm in favor omitting the enums mention in the docs, since it seems to be more confusing than helpful.
History
Date User Action Args
2020-11-29 21:22:39paul.j3setrecipients: + paul.j3, rhettinger, xtreak, shangxiao
2020-11-29 21:22:39paul.j3setmessageid: <1606684959.01.0.720570152233.issue42501@roundup.psfhosted.org>
2020-11-29 21:22:39paul.j3linkissue42501 messages
2020-11-29 21:22:38paul.j3create