Skip to content

Commit 101e368

Browse files
committed
Improve documentation
1 parent 6e75c17 commit 101e368

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/library/argparse.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,16 +1135,16 @@ from *dest*. This is usually what you want because the user never sees the
11351135
*dest* parameter. If this display isn't desirable (perhaps because there are
11361136
many choices), just specify an explicit metavar_.
11371137

1138+
11381139
.. _convert_choices:
11391140

11401141
convert_choices
11411142
^^^^^^^^^^^^^^^
11421143

11431144
By default, when a user passes both a ``type`` and a ``choices`` argument, the
11441145
``choices`` need to be specified in the target type, after conversion.
1145-
This can cause confusing ``usage`` and ``help`` strings. If the user would like
1146-
to specify ``choices`` in the same vocabulary as the end-user would enter them,
1147-
this feature can be enabled by setting ``convert_choices`` to ``True``::
1146+
This can cause confusing ``usage`` and ``help`` strings.
1147+
To specify ``choices`` before conversion, set the flag ``convert_choices``.
11481148

11491149
>>> parser = argparse.ArgumentParser()
11501150
>>> parser.add_argument('when',

0 commit comments

Comments
 (0)