Issue #26778: Fixed "a/an/and" typos in code comment and documentation.
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
index e58d954..cbf0e35 100644
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -657,7 +657,7 @@
 
    TenPointsArrayType = POINT * 10
 
-Here is an example of an somewhat artificial data type, a structure containing 4
+Here is an example of a somewhat artificial data type, a structure containing 4
 POINTs among other stuff::
 
    >>> from ctypes import *
@@ -1576,7 +1576,7 @@
       tuple, this method allows adapting the actual argument to an object that
       the foreign function accepts.  For example, a :class:`c_char_p` item in
       the :attr:`argtypes` tuple will convert a unicode string passed as
-      argument into an byte string using ctypes conversion rules.
+      argument into a byte string using ctypes conversion rules.
 
       New: It is now possible to put items in argtypes which are not ctypes
       types, but each item must have a :meth:`from_param` method which returns a
@@ -1964,7 +1964,7 @@
 .. function:: POINTER(type)
 
    This factory function creates and returns a new ctypes pointer type. Pointer
-   types are cached an reused internally, so calling this function repeatedly is
+   types are cached and reused internally, so calling this function repeatedly is
    cheap. *type* must be a ctypes type.
 
 
diff --git a/Doc/library/fl.rst b/Doc/library/fl.rst
index c689372..b755134 100644
--- a/Doc/library/fl.rst
+++ b/Doc/library/fl.rst
@@ -310,7 +310,7 @@
 
 .. method:: form.add_input(type, x, y, w, h, name)
 
-   Add a input object to the form.  ---  Methods: :meth:`set_input`,
+   Add an input object to the form.  ---  Methods: :meth:`set_input`,
    :meth:`get_input`, :meth:`set_input_color`, :meth:`set_input_return`.
 
 
diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst
index 4384d56..df08fe8 100644
--- a/Doc/library/idle.rst
+++ b/Doc/library/idle.rst
@@ -128,7 +128,7 @@
    Search for the currently selected string, if there is one.
 
 Find in Files...
-   Open a file search dialog.  Put results in an new output window.
+   Open a file search dialog.  Put results in a new output window.
 
 Replace...
    Open a search-and-replace dialog.
diff --git a/Doc/library/marshal.rst b/Doc/library/marshal.rst
index f4dfc1f..0698834 100644
--- a/Doc/library/marshal.rst
+++ b/Doc/library/marshal.rst
@@ -66,7 +66,7 @@
 .. function:: dump(value, file[, version])
 
    Write the value on the open file.  The value must be a supported type.  The
-   file must be a open file object such as ``sys.stdout`` or returned by
+   file must be an open file object such as ``sys.stdout`` or returned by
    :func:`open` or :func:`os.popen`.  It may not be a wrapper such as
    TemporaryFile on Windows. It must be opened in binary mode (``'wb'``
    or ``'w+b'``).
diff --git a/Doc/library/pyexpat.rst b/Doc/library/pyexpat.rst
index 0c8e7fc..f0b6bc3 100644
--- a/Doc/library/pyexpat.rst
+++ b/Doc/library/pyexpat.rst
@@ -788,7 +788,7 @@
 .. data:: XML_ERROR_UNDEFINED_ENTITY
    :noindex:
 
-   A reference was made to a entity which was not defined.
+   A reference was made to an entity which was not defined.
 
 
 .. data:: XML_ERROR_UNKNOWN_ENCODING
diff --git a/Doc/library/restricted.rst b/Doc/library/restricted.rst
index a40d1e9..80f6344 100644
--- a/Doc/library/restricted.rst
+++ b/Doc/library/restricted.rst
@@ -34,7 +34,7 @@
 *mode* parameter is ``'w'``.  It might also perform a :c:func:`chroot`\ -like
 operation on the *filename* parameter, such that root is always relative to some
 safe "sandbox" area of the filesystem.  In this case, the untrusted code would
-still see an built-in :func:`open` function in its environment, with the same
+still see a built-in :func:`open` function in its environment, with the same
 calling interface.  The semantics would be identical too, with :exc:`IOError`\ s
 being raised when the supervisor determined that an unallowable parameter is
 being used.
diff --git a/Doc/library/sgmllib.rst b/Doc/library/sgmllib.rst
index 84911fe..bffd535 100644
--- a/Doc/library/sgmllib.rst
+++ b/Doc/library/sgmllib.rst
@@ -162,7 +162,7 @@
 .. method:: SGMLParser.handle_entityref(ref)
 
    This method is called to process a general entity reference of the form
-   ``&ref;`` where *ref* is an general entity reference.  It converts *ref* by
+   ``&ref;`` where *ref* is a general entity reference.  It converts *ref* by
    passing it to :meth:`convert_entityref`.  If a translation is returned, it calls
    the method :meth:`handle_data` with the translation; otherwise, it calls the
    method ``unknown_entityref(ref)``. The default :attr:`entitydefs` defines
diff --git a/Doc/library/sunaudio.rst b/Doc/library/sunaudio.rst
index 187204e..f09a4d6 100644
--- a/Doc/library/sunaudio.rst
+++ b/Doc/library/sunaudio.rst
@@ -123,7 +123,7 @@
 .. method:: audio device.setinfo(status)
 
    This method sets the audio device status parameters. The *status* parameter is
-   an device status object as returned by :func:`getinfo` and possibly modified by
+   a device status object as returned by :func:`getinfo` and possibly modified by
    the program.
 
 
diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst
index e3d006e..ba4b3e0 100644
--- a/Doc/library/tarfile.rst
+++ b/Doc/library/tarfile.rst
@@ -110,10 +110,10 @@
    +-------------+--------------------------------------------+
    | ``'w|'``    | Open an uncompressed *stream* for writing. |
    +-------------+--------------------------------------------+
-   | ``'w|gz'``  | Open an gzip compressed *stream* for       |
+   | ``'w|gz'``  | Open a gzip compressed *stream* for        |
    |             | writing.                                   |
    +-------------+--------------------------------------------+
-   | ``'w|bz2'`` | Open an bzip2 compressed *stream* for      |
+   | ``'w|bz2'`` | Open a bzip2 compressed *stream* for       |
    |             | writing.                                   |
    +-------------+--------------------------------------------+
 
diff --git a/Doc/library/tix.rst b/Doc/library/tix.rst
index a2f31a0..8626cd8 100644
--- a/Doc/library/tix.rst
+++ b/Doc/library/tix.rst
@@ -276,7 +276,7 @@
 
    The `ExFileSelectBox
    <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixExFileSelectBox.htm>`_
-   widget is usually embedded in a tixExFileSelectDialog widget. It provides an
+   widget is usually embedded in a tixExFileSelectDialog widget. It provides a
    convenient method for the user to select files. The style of the
    :class:`ExFileSelectBox` widget is very similar to the standard file dialog on
    MS Windows 3.1.
diff --git a/Doc/library/urllib.rst b/Doc/library/urllib.rst
index 927696a..91deb39 100644
--- a/Doc/library/urllib.rst
+++ b/Doc/library/urllib.rst
@@ -280,7 +280,7 @@
 
 .. function:: url2pathname(path)
 
-   Convert the path component *path* from an percent-encoded URL to the local syntax for a
+   Convert the path component *path* from a percent-encoded URL to the local syntax for a
    path.  This does not accept a complete URL.  This function uses :func:`unquote`
    to decode *path*.