Issue #26778: Fixed "a/an/and" typos in code comment, documentation and error
messages.
diff --git a/Modules/_csv.c b/Modules/_csv.c
index e01c56e..4284477 100644
--- a/Modules/_csv.c
+++ b/Modules/_csv.c
@@ -731,7 +731,7 @@
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 " */
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index 060dca5..6b1e744 100644
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -3802,7 +3802,7 @@
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");
diff --git a/Modules/_io/stringio.c b/Modules/_io/stringio.c
index 73018a5..e856e2b 100644
--- a/Modules/_io/stringio.c
+++ b/Modules/_io/stringio.c
@@ -438,7 +438,7 @@
_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;
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index 9af07bf..96c8e7b 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -2689,7 +2689,7 @@
_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;
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 545f0a4..fdd60e0 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -4465,7 +4465,7 @@
}
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 @@
/* 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
diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c
index 86cdbd2..beda2b6 100644
--- a/Modules/_tracemalloc.c
+++ b/Modules/_tracemalloc.c
@@ -719,7 +719,7 @@
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
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index 9be5ccf..570c875 100644
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -1178,7 +1178,7 @@
{"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",
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 1d550fa..c82ad7a 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -4484,7 +4484,7 @@
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\
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index 70f2db0..c8b85a0 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -2127,7 +2127,7 @@
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;