Skip to content

Commit b27b57c

Browse files
authored
argparse docs: normalize constant references (#98765)
1 parent 5a8c4b9 commit b27b57c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Doc/library/argparse.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Name Description
6363
action_ Specify how an argument should be handled ``'store'``, ``'store_const'``, ``'store_true'``, ``'append'``, ``'append_const'``, ``'count'``, ``'help'``, ``'version'``
6464
choices_ Limit values to a specific set of choices ``['foo', 'bar']``, ``range(1, 10)``, or :class:`~collections.abc.Container` instance
6565
const_ Store a constant value
66-
default_ Default value used when an argument is not provided Defaults to *None*
66+
default_ Default value used when an argument is not provided Defaults to ``None``
6767
dest_ Specify the attribute name used in the result namespace
6868
help_ Help message for an argument
6969
metavar_ Alternate display name for the argument as shown in help
@@ -201,9 +201,10 @@ ArgumentParser objects
201201
* usage_ - The string describing the program usage (default: generated from
202202
arguments added to parser)
203203

204-
* description_ - Text to display before the argument help (default: none)
204+
* description_ - Text to display before the argument help
205+
(by default, no text)
205206

206-
* epilog_ - Text to display after the argument help (default: none)
207+
* epilog_ - Text to display after the argument help (by default, no text)
207208

208209
* parents_ - A list of :class:`ArgumentParser` objects whose arguments should
209210
also be included
@@ -1926,8 +1927,8 @@ FileType objects
19261927
Namespace(out=<_io.TextIOWrapper name='file.txt' mode='w' encoding='UTF-8'>, raw=<_io.FileIO name='raw.dat' mode='wb'>)
19271928

19281929
FileType objects understand the pseudo-argument ``'-'`` and automatically
1929-
convert this into ``sys.stdin`` for readable :class:`FileType` objects and
1930-
``sys.stdout`` for writable :class:`FileType` objects::
1930+
convert this into :data:`sys.stdin` for readable :class:`FileType` objects and
1931+
:data:`sys.stdout` for writable :class:`FileType` objects::
19311932

19321933
>>> parser = argparse.ArgumentParser()
19331934
>>> parser.add_argument('infile', type=argparse.FileType('r'))

0 commit comments

Comments
 (0)