mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
bpo-29030: Document interaction between *choices* and *metavar*. (GH-23884)
This commit is contained in:
parent
60eccd0956
commit
6afb730e2a
1 changed files with 5 additions and 0 deletions
|
@ -1152,6 +1152,11 @@ Any container can be passed as the *choices* value, so :class:`list` objects,
|
|||
Use of :class:`enum.Enum` is not recommended because it is difficult to
|
||||
control its appearance in usage, help, and error messages.
|
||||
|
||||
Formatted choices overrides the default *metavar* which is normally derived
|
||||
from *dest*. This is usually what you want because the user never sees the
|
||||
*dest* parameter. If this display isn't desirable (perhaps because there are
|
||||
many choices), just specify an explicit metavar_.
|
||||
|
||||
|
||||
required
|
||||
^^^^^^^^
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue