diff options
author | Martin Panter <vadmium+py@gmail.com> | 2017-01-14 08:23:08 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2017-01-14 08:23:08 (GMT) |
commit | 536d70ed331c3192578b73b2b243bc1dbbd8ec2a (patch) | |
tree | a2a1ac1d395d2c4cb632c262df98968cc7ddb23f | |
parent | b71c0956d0904cfdc271cd10d40385c730cf8bcb (diff) | |
download | cpython-536d70ed331c3192578b73b2b243bc1dbbd8ec2a.zip cpython-536d70ed331c3192578b73b2b243bc1dbbd8ec2a.tar.gz cpython-536d70ed331c3192578b73b2b243bc1dbbd8ec2a.tar.bz2 |
Fix grammar, typos and markup in documentation and code comments
* Indent versionchanged at method level, not class level
* Mark up ``--help`` to avoid generating an en dash
* Use forward slash in Unix command line with a dollar sign ($) prompt
-rw-r--r-- | Doc/library/argparse.rst | 4 | ||||
-rw-r--r-- | Doc/library/unittest.rst | 10 | ||||
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rw-r--r-- | Modules/_collectionsmodule.c | 2 | ||||
-rw-r--r-- | Modules/_io/textio.c | 2 | ||||
-rw-r--r-- | Objects/odictobject.c | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index c6b2bf6..4530304 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -174,7 +174,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``) * allow_abbrev_ - Allows long options to be abbreviated if the abbreviation is unambiguous. (default: ``True``) @@ -211,7 +211,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: diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index ac1224c..f02b16a 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -1637,11 +1637,11 @@ Loading and running tests The method optionally resolves *name* relative to the given *module*. - .. versionchanged:: 3.5 - If an :exc:`ImportError` or :exc:`AttributeError` occurs while traversing - *name* then a synthetic test that raises that error when run will be - returned. These errors are included in the errors accumulated by - self.errors. + .. versionchanged:: 3.5 + If an :exc:`ImportError` or :exc:`AttributeError` occurs while traversing + *name* then a synthetic test that raises that error when run will be + returned. These errors are included in the errors accumulated by + self.errors. .. method:: loadTestsFromNames(names, module=None) @@ -189,7 +189,7 @@ Library WeakValueDictionary.pop() when a GC collection happens in another thread. -- Issue #20191: Fixed a crash in resource.prlimit() when pass a sequence that +- Issue #20191: Fixed a crash in resource.prlimit() when passing a sequence that doesn't own its elements as limits. - Issue #28779: multiprocessing.set_forkserver_preload() would crash the diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 10fbcfe..ac81680 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -2169,7 +2169,7 @@ static PyTypeObject defdict_type = { PyDoc_STRVAR(_count_elements_doc, "_count_elements(mapping, iterable) -> None\n\ \n\ -Count elements in the iterable, updating the mappping"); +Count elements in the iterable, updating the mapping"); static PyObject * _count_elements(PyObject *self, PyObject *args) diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index 46c99b5..89b0798 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -1012,7 +1012,7 @@ _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer, errors); if (self->encoder == NULL) goto error; - /* Get the normalized named of the codec */ + /* Get the normalized name of the codec */ res = _PyObject_GetAttrId(codec_info, &PyId_name); if (res == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) diff --git a/Objects/odictobject.c b/Objects/odictobject.c index a6963d7..73deedf 100644 --- a/Objects/odictobject.c +++ b/Objects/odictobject.c @@ -2237,7 +2237,7 @@ odictvalues_new(PyObject *od) /* ---------------------------------------------- - MutableMappping implementations + MutableMapping implementations Mapping: |