[Python-checkins] [3.10] `argparse` docs: normalize constant references (#98765) (#98808)

AlexWaygood webhook-mailer at python.org
Fri Oct 28 13:17:47 EDT 2022


https://github.com/python/cpython/commit/4320115613c93470dd1e22ec2517f5fc875c5423
commit: 4320115613c93470dd1e22ec2517f5fc875c5423
branch: 3.10
author: Alex Waygood <Alex.Waygood at Gmail.com>
committer: AlexWaygood <Alex.Waygood at Gmail.com>
date: 2022-10-28T18:17:03+01:00
summary:

[3.10] `argparse` docs: normalize constant references (#98765) (#98808)

`argparse` docs: normalize constant references (#98765)

(cherry picked from commit b27b57c6e44a276c8a9843fd37d4cf65b2827d5c)

Co-authored-by: Skip Montanaro <skip.montanaro at gmail.com>

files:
M Doc/library/argparse.rst

diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index d96f17b80a5f..bdc2ccebb7bb 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -154,9 +154,10 @@ ArgumentParser objects
    * usage_ - The string describing the program usage (default: generated from
      arguments added to parser)
 
-   * description_ - Text to display before the argument help (default: none)
+   * description_ - Text to display before the argument help
+     (by default, no text)
 
-   * epilog_ - Text to display after the argument help (default: none)
+   * epilog_ - Text to display after the argument help (by default, no text)
 
    * parents_ - A list of :class:`ArgumentParser` objects whose arguments should
      also be included
@@ -1831,8 +1832,8 @@ FileType objects
       Namespace(out=<_io.TextIOWrapper name='file.txt' mode='w' encoding='UTF-8'>, raw=<_io.FileIO name='raw.dat' mode='wb'>)
 
    FileType objects understand the pseudo-argument ``'-'`` and automatically
-   convert this into ``sys.stdin`` for readable :class:`FileType` objects and
-   ``sys.stdout`` for writable :class:`FileType` objects::
+   convert this into :data:`sys.stdin` for readable :class:`FileType` objects and
+   :data:`sys.stdout` for writable :class:`FileType` objects::
 
       >>> parser = argparse.ArgumentParser()
       >>> parser.add_argument('infile', type=argparse.FileType('r'))



More information about the Python-checkins mailing list