8000 More doctest fixes · python/cpython@3bca80f · GitHub
[go: up one dir, main page]

Skip to content

Commit 3bca80f

Browse files
committed
More doctest fixes
1 parent c18ed75 commit 3bca80f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Doc/library/argparse.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ convert_choices
11761176
By default, when a user passes both a ``type`` and a ``choices`` argument, the
11771177
``choices`` need to be specified in the target type, after conversion.
11781178
This can cause confusing ``usage`` and ``help`` strings.
1179-
To specify ``choices`` before conversion, set the flag ``convert_choices``.
1179+
To specify ``choices`` before conversion, set the flag ``convert_choices``::
11801180

11811181
>>> def to_dow(s):
11821182
... return ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su'].index(x)
@@ -1186,7 +1186,6 @@ To specify ``choices`` before conversion, set the flag ``convert_choices``.
11861186
... choices=['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su'],
11871187
... convert_choices=True,
11881188
... type=to_dow)
1189-
_StoreAction(option_strings=[], dest='when', nargs=None, const=None, default=None, type=<function to_dow at 0x7f3ff4d0ebd0>, choices=['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su'], convert_choices=True, required=True, help=None, metavar=None, deprecated=False)
11901189
>>> parser.print_help()
11911190
usage: sphinx-build [-h] {mo,tu,we,th,fr,sa,su}
11921191

@@ -1195,7 +1194,6 @@ To specify ``choices`` before conversion, set the flag ``convert_choices``.
11951194

11961195
options:
11971196
-h, --help show this help message and exit
1198-
>>>
11991197

12001198
.. versionadded:: next
12011199

0 commit comments

Comments
 (0)
0