Issue #25523: Backported a-to-an corrections.
diff --git a/Doc/distutils/packageindex.rst b/Doc/distutils/packageindex.rst
index be72bb7..7494495 100644
--- a/Doc/distutils/packageindex.rst
+++ b/Doc/distutils/packageindex.rst
@@ -169,7 +169,7 @@
username: <username>
password: <password>
-The *distutils* section defines a *index-servers* variable that lists the
+The *distutils* section defines an *index-servers* variable that lists the
name of all sections describing a repository.
Each section describing a repository defines three variables:
diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst
index 1a26281..e2359d9 100644
--- a/Doc/howto/descriptor.rst
+++ b/Doc/howto/descriptor.rst
@@ -325,7 +325,7 @@
patterns of binding functions into methods.
To recap, functions have a :meth:`__get__` method so that they can be converted
-to a method when accessed as attributes. The non-data descriptor transforms a
+to a method when accessed as attributes. The non-data descriptor transforms an
``obj.f(*args)`` call into ``f(obj, *args)``. Calling ``klass.f(*args)``
becomes ``f(*args)``.
diff --git a/Doc/install/index.rst b/Doc/install/index.rst
index 3b6ccba..eb499e9 100644
--- a/Doc/install/index.rst
+++ b/Doc/install/index.rst
@@ -149,7 +149,7 @@
On Windows, you'd probably download :file:`foo-1.0.zip`. If you downloaded the
archive file to :file:`C:\\Temp`, then it would unpack into
-:file:`C:\\Temp\\foo-1.0`; you can use either a archive manipulator with a
+:file:`C:\\Temp\\foo-1.0`; you can use either an archive manipulator with a
graphical user interface (such as WinZip) or a command-line tool (such as
:program:`unzip` or :program:`pkunzip`) to unpack the archive. Then, open a
command prompt window and run::
diff --git a/Doc/library/email.parser.rst b/Doc/library/email.parser.rst
index 0f99a2f..04e2334 100644
--- a/Doc/library/email.parser.rst
+++ b/Doc/library/email.parser.rst
@@ -133,7 +133,7 @@
methods on file-like objects.
The text contained in *fp* must be formatted as a block of :rfc:`2822`
- style headers and header continuation lines, optionally preceded by a
+ style headers and header continuation lines, optionally preceded by an
envelope header. The header block is terminated either by the end of the
data or by a blank line. Following the header block is the body of the
message (which may contain MIME-encoded subparts).
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index 5e3bd1c..ca91cd7 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -568,7 +568,7 @@
.. versionadded:: 2.7
Unittest supports skipping individual test methods and even whole classes of
-tests. In addition, it supports marking a test as a "expected failure," a test
+tests. In addition, it supports marking a test as an "expected failure," a test
that is broken and will fail, but shouldn't be counted as a failure on a
:class:`TestResult`.
diff --git a/Doc/library/zlib.rst b/Doc/library/zlib.rst
index 192bd4d..70e1483 100644
--- a/Doc/library/zlib.rst
+++ b/Doc/library/zlib.rst
@@ -31,7 +31,7 @@
.. function:: adler32(data[, value])
- Computes a Adler-32 checksum of *data*. (An Adler-32 checksum is almost as
+ Computes an Adler-32 checksum of *data*. (An Adler-32 checksum is almost as
reliable as a CRC32 but can be computed much more quickly.) If *value* is
present, it is used as the starting value of the checksum; otherwise, a fixed
default value is used. This allows computing a running checksum over the
diff --git a/Doc/whatsnew/2.7.rst b/Doc/whatsnew/2.7.rst
index f4e7589..e2560c7 100644
--- a/Doc/whatsnew/2.7.rst
+++ b/Doc/whatsnew/2.7.rst
@@ -1118,7 +1118,7 @@
(Fixed by Daniel Stutzbach; :issue:`8729`.)
* Constructors for the parsing classes in the :mod:`ConfigParser` module now
- take a *allow_no_value* parameter, defaulting to false; if true,
+ take an *allow_no_value* parameter, defaulting to false; if true,
options without values will be allowed. For example::
>>> import ConfigParser, StringIO
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index 9ab724a..1269bf6 100644
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -1307,7 +1307,7 @@
int op /* Operation: Py_EQ, Py_NE, Py_GT, etc. */
);
-/* Apply a argument tuple or dictionary to a format string and return
+/* Apply an argument tuple or dictionary to a format string and return
the resulting Unicode string. */
PyAPI_FUNC(PyObject *) PyUnicode_Format(
diff --git a/Lib/cookielib.py b/Lib/cookielib.py
index f2df467..eb9aec4 100644
--- a/Lib/cookielib.py
+++ b/Lib/cookielib.py
@@ -1434,7 +1434,7 @@
break
# convert RFC 2965 Max-Age to seconds since epoch
# XXX Strictly you're supposed to follow RFC 2616
- # age-calculation rules. Remember that zero Max-Age is a
+ # age-calculation rules. Remember that zero Max-Age
# is a request to discard (old and new) cookie, though.
k = "expires"
v = self._now + v
diff --git a/Lib/ctypes/test/test_random_things.py b/Lib/ctypes/test/test_random_things.py
index 0caffe3..d72b7c8 100644
--- a/Lib/ctypes/test/test_random_things.py
+++ b/Lib/ctypes/test/test_random_things.py
@@ -30,7 +30,7 @@
# value is printed correctly.
#
# Changed in 0.9.3: No longer is '(in callback)' prepended to the
- # error message - instead a additional frame for the C code is
+ # error message - instead an additional frame for the C code is
# created, then a full traceback printed. When SystemExit is
# raised in a callback function, the interpreter exits.
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index cb7edf0..b4f6b3c 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -1117,7 +1117,7 @@
return self._bind(('bind', className), sequence, func, add, 0)
def unbind_class(self, className, sequence):
- """Unbind for a all widgets with bindtag CLASSNAME for event SEQUENCE
+ """Unbind for all widgets with bindtag CLASSNAME for event SEQUENCE
all functions."""
self.tk.call('bind', className , sequence, '')
def mainloop(self, n=0):
diff --git a/Lib/lib2to3/fixes/fix_metaclass.py b/Lib/lib2to3/fixes/fix_metaclass.py
index 4f5593c..8399a13 100644
--- a/Lib/lib2to3/fixes/fix_metaclass.py
+++ b/Lib/lib2to3/fixes/fix_metaclass.py
@@ -114,7 +114,7 @@
left_node = expr_node.children[0]
if isinstance(left_node, Leaf) and \
left_node.value == u'__metaclass__':
- # We found a assignment to __metaclass__.
+ # We found an assignment to __metaclass__.
fixup_simple_stmt(node, i, simple_node)
remove_trailing_newline(simple_node)
yield (node, i, simple_node)
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index a51387e..0007da6 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -62,7 +62,7 @@
Additional Option Details:
--r randomizes test execution order. You can use --randseed=int to provide a
+-r randomizes test execution order. You can use --randseed=int to provide an
int seed value for the randomizer; this is useful for reproducing troublesome
test orders.
diff --git a/Lib/test/test_dict.py b/Lib/test/test_dict.py
index a5685b9..1c63fc0 100644
--- a/Lib/test/test_dict.py
+++ b/Lib/test/test_dict.py
@@ -448,7 +448,7 @@
# (D) subclass defines __missing__ method returning a value
# (E) subclass defines __missing__ method raising RuntimeError
# (F) subclass sets __missing__ instance variable (no effect)
- # (G) subclass doesn't define __missing__ at a all
+ # (G) subclass doesn't define __missing__ at all
class D(dict):
def __missing__(self, key):
return 42
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 252d5d8..34760c9 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -15,7 +15,7 @@
################################################################################
# When writing tests for io, it's important to test both the C and Python
# implementations. This is usually done by writing a base test that refers to
-# the type it is testing as a attribute. Then it provides custom subclasses to
+# the type it is testing as an attribute. Then it provides custom subclasses to
# test both implementations. This file has lots of examples.
################################################################################
diff --git a/Lib/test/test_userdict.py b/Lib/test/test_userdict.py
index fa80fea..99526a2 100644
--- a/Lib/test/test_userdict.py
+++ b/Lib/test/test_userdict.py
@@ -188,7 +188,7 @@
# (D) subclass defines __missing__ method returning a value
# (E) subclass defines __missing__ method raising RuntimeError
# (F) subclass sets __missing__ instance variable (no effect)
- # (G) subclass doesn't define __missing__ at a all
+ # (G) subclass doesn't define __missing__ at all
class D(UserDict.UserDict):
def __missing__(self, key):
return 42
diff --git a/Misc/HISTORY b/Misc/HISTORY
index a29b907..41317e5 100644
--- a/Misc/HISTORY
+++ b/Misc/HISTORY
@@ -1495,7 +1495,7 @@
- Bug #1194181: bz2.BZ2File didn't handle mode 'U' correctly.
-- Patch #1212117: os.stat().st_flags is now accessible as a attribute
+- Patch #1212117: os.stat().st_flags is now accessible as an attribute
if available on the platform.
- Patch #1103951: Expose O_SHLOCK and O_EXLOCK in the posix module if
diff --git a/Misc/NEWS b/Misc/NEWS
index b0b8962..c9dbb46 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -936,7 +936,7 @@
Changes are written to HOME/.idlerc/config-extensions.cfg.
Original patch by Tal Einat.
-- Issue #16233: A module browser (File : Class Browser, Alt+C) requires a
+- Issue #16233: A module browser (File : Class Browser, Alt+C) requires an
editor window with a filename. When Class Browser is requested otherwise,
from a shell, output window, or 'Untitled' editor, Idle no longer displays
an error box. It now pops up an Open Module box (Alt+M). If a valid name
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index dff5925..17e1b85 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -2788,7 +2788,7 @@
cadata_ascii = PyUnicode_AsASCIIString(cadata);
if (cadata_ascii == NULL) {
PyErr_SetString(PyExc_TypeError,
- "cadata should be a ASCII string or a "
+ "cadata should be an ASCII string or a "
"bytes-like object");
goto error;
}
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 394bbaf..c3cf1c0 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -1410,7 +1410,7 @@
"starmap(function, sequence) --> starmap object\n\
\n\
Return an iterator whose values are returned from the function evaluated\n\
-with a argument tuple taken from the given sequence.");
+with an argument tuple taken from the given sequence.");
static PyTypeObject starmap_type = {
PyVarObject_HEAD_INIT(NULL, 0)