]> granicus.if.org Git - python/commitdiff
Fix spelling and markup in documentation and code comment
authorMartin Panter <vadmium+py@gmail.com>
Sat, 14 Jan 2017 08:51:49 +0000 (08:51 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Sat, 14 Jan 2017 08:51:49 +0000 (08:51 +0000)
* Mark up ``--help`` to avoid generating an en dash
* Use forward slash in Unix command line with a dollar sign ($) prompt

Doc/library/argparse.rst
Modules/_io/textio.c

index 4ce683547fe0ac5106c0be95c025b20ada3af074..1ea1f3fc1a564ad41face5c5f1e20588507ebae2 100644 (file)
@@ -173,7 +173,7 @@ ArgumentParser objects
    * 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 @@ The help for this program will display ``myprogram.py`` as the program name
     -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:
index b4007c27e7039d9ff3da5c194d50f20c328ff825..f13dcb4366e06f78fbd6e3d32119101e0d01eecf 100644 (file)
@@ -983,7 +983,7 @@ textiowrapper_init(textio *self, PyObject *args, PyObject *kwds)
                                                            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))