Issue #26778: Fixed "a/an/and" typos in code comment, documentation and error

messages.
This commit is contained in:
Serhiy Storchaka 2016-04-17 09:39:28 +03:00
commit b6a9c9761c
68 changed files with 93 additions and 92 deletions

View file

@ -731,7 +731,7 @@ parse_process_char(ReaderObj *self, Py_UCS4 c)
break;
case QUOTE_IN_QUOTED_FIELD:
/* doublequote - seen a quote in an quoted field */
/* doublequote - seen a quote in a quoted field */
if (dialect->quoting != QUOTE_NONE &&
c == dialect->quotechar) {
/* save "" as " */

View file

@ -3802,7 +3802,7 @@ PyCFuncPtr_call(PyCFuncPtrObject *self, PyObject *inargs, PyObject *kwds)
return NULL;
}
/* there should be more checks? No, in Python */
/* First arg is an pointer to an interface instance */
/* First arg is a pointer to an interface instance */
if (!this->b_ptr || *(void **)this->b_ptr == NULL) {
PyErr_SetString(PyExc_ValueError,
"NULL COM pointer access");

View file

@ -438,7 +438,7 @@ stringio_iternext(stringio *self)
_PyIO_str_readline, NULL);
if (line && !PyUnicode_Check(line)) {
PyErr_Format(PyExc_IOError,
"readline() should have returned an str object, "
"readline() should have returned a str object, "
"not '%.200s'", Py_TYPE(line)->tp_name);
Py_DECREF(line);
return NULL;

View file

@ -2689,7 +2689,7 @@ textiowrapper_iternext(textio *self)
_PyIO_str_readline, NULL);
if (line && !PyUnicode_Check(line)) {
PyErr_Format(PyExc_IOError,
"readline() should have returned an str object, "
"readline() should have returned a str object, "
"not '%.200s'", Py_TYPE(line)->tp_name);
Py_DECREF(line);
return NULL;

View file

@ -4465,7 +4465,7 @@ Pickler_set_memo(PicklerObject *self, PyObject *obj)
}
else {
PyErr_Format(PyExc_TypeError,
"'memo' attribute must be an PicklerMemoProxy object"
"'memo' attribute must be a PicklerMemoProxy object"
"or dict, not %.200s", Py_TYPE(obj)->tp_name);
return -1;
}
@ -4703,7 +4703,7 @@ calc_binsize(char *bytes, int nbytes)
/* s contains x bytes of a little-endian integer. Return its value as a
* C int. Obscure: when x is 1 or 2, this is an unsigned little-endian
* int, but when x is 4 it's a signed one. This is an historical source
* int, but when x is 4 it's a signed one. This is a historical source
* of x-platform bugs.
*/
static long

View file

@ -719,7 +719,7 @@ tracemalloc_realloc(void *ctx, void *ptr, size_t new_size)
the caller, because realloc() may already have shrinked the
memory block and so removed bytes.
This case is very unlikely: an hash entry has just been
This case is very unlikely: a hash entry has just been
released, so the hash table should have at least one free entry.
The GIL and the table lock ensures that only one thread is

View file

@ -1178,7 +1178,7 @@ static PyMethodDef module_methods[] = {
{"register",
(PyCFunction)faulthandler_register_py, METH_VARARGS|METH_KEYWORDS,
PyDoc_STR("register(signum, file=sys.stderr, all_threads=True, chain=False): "
"register an handler for the signal 'signum': dump the "
"register a handler for the signal 'signum': dump the "
"traceback of the current thread, or of all threads if "
"all_threads is True, into file")},
{"unregister",

View file

@ -4484,7 +4484,7 @@ static PyMethodDef zip_longest_methods[] = {
PyDoc_STRVAR(zip_longest_doc,
"zip_longest(iter1 [,iter2 [...]], [fillvalue=None]) --> zip_longest object\n\
\n\
Return an zip_longest object whose .__next__() method returns a tuple where\n\
Return a zip_longest object whose .__next__() method returns a tuple where\n\
the i-th element comes from the i-th iterable argument. The .__next__()\n\
method continues until the longest iterable in the argument sequence\n\
is exhausted and then it raises StopIteration. When the shorter iterables\n\

View file

@ -2127,7 +2127,7 @@ kqueue_queue_control(kqueue_queue_Object *self, PyObject *args)
if (_PyTime_FromSecondsObject(&timeout,
otimeout, _PyTime_ROUND_CEILING) < 0) {
PyErr_Format(PyExc_TypeError,
"timeout argument must be an number "
"timeout argument must be a number "
"or None, got %.200s",
Py_TYPE(otimeout)->tp_name);
return NULL;