[Python-checkins] cpython (2.7): Fix spelling and markup in documentation and code comment

martin.panter python-checkins at python.org
Sat Jan 14 05:17:18 EST 2017


https://hg.python.org/cpython/rev/508e10a0d567
changeset:   106147:508e10a0d567
branch:      2.7
parent:      106131:fb27b7141de0
user:        Martin Panter <vadmium+py at gmail.com>
date:        Sat Jan 14 08:51:49 2017 +0000
summary:
  Fix spelling and markup in documentation and code comment

* Mark up ``--help`` to avoid generating an en dash
* Use forward slash in Unix command line with a dollar sign ($) prompt

files:
  Doc/library/argparse.rst |  4 ++--
  Modules/_io/textio.c     |  2 +-
  2 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -173,7 +173,7 @@
    * conflict_handler_ - The strategy for resolving conflicting optionals
      (usually unnecessary)
 
-   * add_help_ - Add a -h/--help option to the parser (default: ``True``)
+   * add_help_ - Add a ``-h/--help`` option to the parser (default: ``True``)
 
 The following sections describe how each of these are used.
 
@@ -204,7 +204,7 @@
     -h, --help  show this help message and exit
     --foo FOO   foo help
    $ cd ..
-   $ python subdir\myprogram.py --help
+   $ python subdir/myprogram.py --help
    usage: myprogram.py [-h] [--foo FOO]
 
    optional arguments:
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -983,7 +983,7 @@
                                                            errors);
         if (self->encoder == NULL)
             goto error;
-        /* Get the normalized named of the codec */
+        /* Get the normalized name of the codec */
         res = PyObject_GetAttrString(codec_info, "name");
         if (res == NULL) {
             if (PyErr_ExceptionMatches(PyExc_AttributeError))

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list