@@ -1127,25 +1127,25 @@ if the argument was not one of the acceptable values::
11271127Any sequence can be passed as the *choices * value, so :class: `list ` objects,
11281128:class: `tuple ` objects, and custom sequences are all supported.
11291129
1130- Formatted choices override the default *metavar * which is normally derived
1131- from *dest *. This is usually what you want because the user never sees the
1132- *dest * parameter. If this display isn't desirable (perhaps because there are
1133- many choices), just specify an explicit metavar _.
1130+ Use of :class: `enum.Enum ` is not recommended because it is difficult to
1131+ control its appearance in usage, help, and error messages.
11341132
11351133Note that inclusion in the *choices * sequence is checked after any type _
11361134conversions have been performed, so the type of the objects in the *choices *
11371135sequence should match the type _ specified. This may interfere with
11381136the display of the choices in usage, help and error messages, because the
11391137*choices * may not be familiar to the end-user.
11401138
1141- Use of :class: `enum.Enum ` is not recommended because it is difficult to
1142- control its appearance in these messages.
1143-
11441139If you have to use both *type * and *choices * you can use a wrapper class
11451140that formats the value after type conversion back to the vocabulary of the
11461141end-user. However, it is usually easier to not specify *type * and perform
11471142type conversion in application code.
11481143
1144+ Formatted choices override the default *metavar * which is normally derived
1145+ from *dest *. This is usually what you want because the user never sees the
1146+ *dest * parameter. If this display isn't desirable (perhaps because there are
1147+ many choices), just specify an explicit metavar _.
1148+
11491149
11501150.. _required :
11511151
0 commit comments