Commit 536d70ed authored by Martin Panter's avatar Martin Panter

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
parent b71c0956
...@@ -174,7 +174,7 @@ ArgumentParser objects ...@@ -174,7 +174,7 @@ ArgumentParser objects
* conflict_handler_ - The strategy for resolving conflicting optionals * conflict_handler_ - The strategy for resolving conflicting optionals
(usually unnecessary) (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 * allow_abbrev_ - Allows long options to be abbreviated if the
abbreviation is unambiguous. (default: ``True``) abbreviation is unambiguous. (default: ``True``)
...@@ -211,7 +211,7 @@ The help for this program will display ``myprogram.py`` as the program name ...@@ -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 -h, --help show this help message and exit
--foo FOO foo help --foo FOO foo help
$ cd .. $ cd ..
$ python subdir\myprogram.py --help $ python subdir/myprogram.py --help
usage: myprogram.py [-h] [--foo FOO] usage: myprogram.py [-h] [--foo FOO]
optional arguments: optional arguments:
......
...@@ -189,7 +189,7 @@ Library ...@@ -189,7 +189,7 @@ Library
WeakValueDictionary.pop() when a GC collection happens in another WeakValueDictionary.pop() when a GC collection happens in another
thread. 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. doesn't own its elements as limits.
- Issue #28779: multiprocessing.set_forkserver_preload() would crash the - Issue #28779: multiprocessing.set_forkserver_preload() would crash the
......
...@@ -2169,7 +2169,7 @@ static PyTypeObject defdict_type = { ...@@ -2169,7 +2169,7 @@ static PyTypeObject defdict_type = {
PyDoc_STRVAR(_count_elements_doc, PyDoc_STRVAR(_count_elements_doc,
"_count_elements(mapping, iterable) -> None\n\ "_count_elements(mapping, iterable) -> None\n\
\n\ \n\
Count elements in the iterable, updating the mappping"); Count elements in the iterable, updating the mapping");
static PyObject * static PyObject *
_count_elements(PyObject *self, PyObject *args) _count_elements(PyObject *self, PyObject *args)
......
...@@ -1012,7 +1012,7 @@ _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer, ...@@ -1012,7 +1012,7 @@ _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer,
errors); errors);
if (self->encoder == NULL) if (self->encoder == NULL)
goto error; goto error;
/* Get the normalized named of the codec */ /* Get the normalized name of the codec */
res = _PyObject_GetAttrId(codec_info, &PyId_name); res = _PyObject_GetAttrId(codec_info, &PyId_name);
if (res == NULL) { if (res == NULL) {
if (PyErr_ExceptionMatches(PyExc_AttributeError)) if (PyErr_ExceptionMatches(PyExc_AttributeError))
......
...@@ -2237,7 +2237,7 @@ odictvalues_new(PyObject *od) ...@@ -2237,7 +2237,7 @@ odictvalues_new(PyObject *od)
/* ---------------------------------------------- /* ----------------------------------------------
MutableMappping implementations MutableMapping implementations
Mapping: Mapping:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment