[Python-checkins] cpython (2.7): Issue #25523: Correct "a" article to "an" article

martin.panter python-checkins at python.org
Mon Jul 11 09:20:52 EDT 2016


https://hg.python.org/cpython/rev/651f7addf4a8
changeset:   102321:651f7addf4a8
branch:      2.7
parent:      102319:43d7e5fb3bc2
user:        Martin Panter <vadmium+py at gmail.com>
date:        Mon Nov 02 03:37:02 2015 +0000
summary:
  Issue #25523: Correct "a" article to "an" article

This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
to fix the grammar.

files:
  Demo/tix/INSTALL.txt                      |   2 +-
  Doc/howto/sorting.rst                     |   2 +-
  Doc/library/chunk.rst                     |   2 +-
  Doc/library/difflib.rst                   |   2 +-
  Doc/library/ftplib.rst                    |   4 +-
  Doc/library/io.rst                        |   2 +-
  Doc/library/optparse.rst                  |   2 +-
  Doc/library/os.path.rst                   |   2 +-
  Doc/library/smtplib.rst                   |   4 +-
  Doc/library/socket.rst                    |   2 +-
  Doc/library/sqlite3.rst                   |   2 +-
  Doc/library/sunau.rst                     |   4 +-
  Doc/library/webbrowser.rst                |   2 +-
  Doc/reference/datamodel.rst               |   2 +-
  Doc/tutorial/errors.rst                   |   2 +-
  Doc/whatsnew/2.1.rst                      |   2 +-
  Include/abstract.h                        |   2 +-
  Include/codecs.h                          |   4 +-
  Lib/_pyio.py                              |   2 +-
  Lib/chunk.py                              |   2 +-
  Lib/codecs.py                             |   6 ++--
  Lib/distutils/cygwinccompiler.py          |   2 +-
  Lib/ftplib.py                             |   4 +-
  Lib/idlelib/EditorWindow.py               |   2 +-
  Lib/idlelib/ReplaceDialog.py              |   2 +-
  Lib/io.py                                 |   2 +-
  Lib/lib2to3/fixes/fix_input.py            |   2 +-
  Lib/msilib/schema.py                      |   2 +-
  Lib/test/decimaltestdata/fma.decTest      |   1 +
  Lib/test/decimaltestdata/multiply.decTest |   1 +
  Lib/test/test_os.py                       |   2 +-
  Lib/test/test_support.py                  |   2 +-
  Lib/xmlrpclib.py                          |   4 +-
  Misc/HISTORY                              |   6 ++--
  Misc/NEWS                                 |  12 +++++-----
  Misc/cheatsheet                           |   2 +-
  Modules/_ctypes/libffi/src/x86/darwin64.S |   2 +-
  Modules/_ctypes/libffi/src/x86/unix64.S   |   2 +-
  Modules/_ctypes/libffi_osx/x86/darwin64.S |   2 +-
  Modules/_hashopenssl.c                    |   2 +-
  Modules/_io/_iomodule.c                   |   2 +-
  Modules/_io/iobase.c                      |   2 +-
  Modules/_io/textio.c                      |   4 +-
  Modules/audioop.c                         |   2 +-
  Modules/expat/pyexpatns.h                 |   2 +-
  Modules/readline.c                        |   2 +-
  Objects/abstract.c                        |   2 +-
  PC/msvcrtmodule.c                         |   2 +-
  PC/os2emx/Makefile                        |   2 +-
  Python/thread.c                           |   2 +-
  Tools/msi/schema.py                       |   2 +-
  Tools/msi/uisample.py                     |   2 +-
  52 files changed, 68 insertions(+), 66 deletions(-)


diff --git a/Demo/tix/INSTALL.txt b/Demo/tix/INSTALL.txt
--- a/Demo/tix/INSTALL.txt
+++ b/Demo/tix/INSTALL.txt
@@ -4,7 +4,7 @@
 ----------------
 
 0) To use Tix.py, you need Tcl/Tk (V8.3.3), Tix (V8.1.1) and Python (V2.1.1).
-   Tix.py has been written and tested on a Intel Pentium running RH Linux 5.2
+   Tix.py has been written and tested on an Intel Pentium running RH Linux 5.2
    and Mandrake Linux 7.0 and Windows with the above mentioned packages.
 
    Older versions, e.g. Tix 4.1 and Tk 8.0, might also work.
diff --git a/Doc/howto/sorting.rst b/Doc/howto/sorting.rst
--- a/Doc/howto/sorting.rst
+++ b/Doc/howto/sorting.rst
@@ -90,7 +90,7 @@
 The key-function patterns shown above are very common, so Python provides
 convenience functions to make accessor functions easier and faster. The operator
 module has :func:`operator.itemgetter`, :func:`operator.attrgetter`, and
-starting in Python 2.5 a :func:`operator.methodcaller` function.
+starting in Python 2.5 an :func:`operator.methodcaller` function.
 
 Using those functions, the above examples become simpler and faster:
 
diff --git a/Doc/library/chunk.rst b/Doc/library/chunk.rst
--- a/Doc/library/chunk.rst
+++ b/Doc/library/chunk.rst
@@ -48,7 +48,7 @@
 the :class:`Chunk` class defined here is to instantiate an instance at the start
 of each chunk and read from the instance until it reaches the end, after which a
 new instance can be instantiated. At the end of the file, creating a new
-instance will fail with a :exc:`EOFError` exception.
+instance will fail with an :exc:`EOFError` exception.
 
 
 .. class:: Chunk(file[, align, bigendian, inclheader])
diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst
--- a/Doc/library/difflib.rst
+++ b/Doc/library/difflib.rst
@@ -276,7 +276,7 @@
    generating the delta lines) in unified diff format.
 
    Unified diffs are a compact way of showing just the lines that have changed plus
-   a few lines of context.  The changes are shown in a inline style (instead of
+   a few lines of context.  The changes are shown in an inline style (instead of
    separate before/after blocks).  The number of context lines is set by *n* which
    defaults to three.
 
diff --git a/Doc/library/ftplib.rst b/Doc/library/ftplib.rst
--- a/Doc/library/ftplib.rst
+++ b/Doc/library/ftplib.rst
@@ -283,9 +283,9 @@
 
 .. method:: FTP.transfercmd(cmd[, rest])
 
-   Initiate a transfer over the data connection.  If the transfer is active, send a
+   Initiate a transfer over the data connection.  If the transfer is active, send an
    ``EPRT`` or  ``PORT`` command and the transfer command specified by *cmd*, and
-   accept the connection.  If the server is passive, send a ``EPSV`` or ``PASV``
+   accept the connection.  If the server is passive, send an ``EPSV`` or ``PASV``
    command, connect to it, and start the transfer command.  Either way, return the
    socket for the connection.
 
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -221,7 +221,7 @@
    Even though :class:`IOBase` does not declare :meth:`read`, :meth:`readinto`,
    or :meth:`write` because their signatures will vary, implementations and
    clients should consider those methods part of the interface.  Also,
-   implementations may raise a :exc:`IOError` when operations they do not
+   implementations may raise an :exc:`IOError` when operations they do not
    support are called.
 
    The basic type used for binary data read from or written to a file is
diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst
--- a/Doc/library/optparse.rst
+++ b/Doc/library/optparse.rst
@@ -1327,7 +1327,7 @@
    the list of arguments to process (default: ``sys.argv[1:]``)
 
 ``values``
-   a :class:`optparse.Values` object to store option arguments in (default: a
+   an :class:`optparse.Values` object to store option arguments in (default: a
    new instance of :class:`Values`) -- if you give an existing object, the
    option defaults will not be initialized on it
 
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -256,7 +256,7 @@
 .. function:: samefile(path1, path2)
 
    Return ``True`` if both pathname arguments refer to the same file or directory
-   (as indicated by device number and i-node number). Raise an exception if a
+   (as indicated by device number and i-node number). Raise an exception if an
    :func:`os.stat` call on either pathname fails.
 
    Availability: Unix.
diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst
--- a/Doc/library/smtplib.rst
+++ b/Doc/library/smtplib.rst
@@ -22,7 +22,7 @@
 
 .. class:: SMTP([host[, port[, local_hostname[, timeout]]]])
 
-   A :class:`SMTP` instance encapsulates an SMTP connection.  It has methods
+   An :class:`SMTP` instance encapsulates an SMTP connection.  It has methods
    that support a full repertoire of SMTP and ESMTP operations. If the optional
    host and port parameters are given, the SMTP :meth:`connect` method is
    called with those parameters during initialization.  If specified,
@@ -45,7 +45,7 @@
 
 .. class:: SMTP_SSL([host[, port[, local_hostname[, keyfile[, certfile[, timeout]]]]]])
 
-   A :class:`SMTP_SSL` instance behaves exactly the same as instances of
+   An :class:`SMTP_SSL` instance behaves exactly the same as instances of
    :class:`SMTP`. :class:`SMTP_SSL` should be used for situations where SSL is
    required from the beginning of the connection and using :meth:`starttls` is
    not appropriate. If *host* is not specified, the local host is used. If
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -757,7 +757,7 @@
    Set blocking or non-blocking mode of the socket: if *flag* is 0, the socket is
    set to non-blocking, else to blocking mode.  Initially all sockets are in
    blocking mode.  In non-blocking mode, if a :meth:`recv` call doesn't find any
-   data, or if a :meth:`send` call can't immediately dispose of the data, a
+   data, or if a :meth:`send` call can't immediately dispose of the data, an
    :exc:`error` exception is raised; in blocking mode, the calls block until they
    can proceed. ``s.setblocking(0)`` is equivalent to ``s.settimeout(0.0)``;
    ``s.setblocking(1)`` is equivalent to ``s.settimeout(None)``.
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -583,7 +583,7 @@
    .. attribute:: lastrowid
 
       This read-only attribute provides the rowid of the last modified row. It is
-      only set if you issued a ``INSERT`` statement using the :meth:`execute`
+      only set if you issued an ``INSERT`` statement using the :meth:`execute`
       method. For operations other than ``INSERT`` or when :meth:`executemany` is
       called, :attr:`lastrowid` is set to :const:`None`.
 
diff --git a/Doc/library/sunau.rst b/Doc/library/sunau.rst
--- a/Doc/library/sunau.rst
+++ b/Doc/library/sunau.rst
@@ -54,8 +54,8 @@
 
    Note that it does not allow read/write files.
 
-   A *mode* of ``'r'`` returns a :class:`AU_read` object, while a *mode* of ``'w'``
-   or ``'wb'`` returns a :class:`AU_write` object.
+   A *mode* of ``'r'`` returns an :class:`AU_read` object, while a *mode* of ``'w'``
+   or ``'wb'`` returns an :class:`AU_write` object.
 
 
 .. function:: openfp(file, mode)
diff --git a/Doc/library/webbrowser.rst b/Doc/library/webbrowser.rst
--- a/Doc/library/webbrowser.rst
+++ b/Doc/library/webbrowser.rst
@@ -20,7 +20,7 @@
 the user exits the browser.
 
 If the environment variable :envvar:`BROWSER` exists, it is interpreted to
-override the platform default list of browsers, as a :data:`os.pathsep`-separated
+override the platform default list of browsers, as an :data:`os.pathsep`-separated
 list of browsers to try in order.  When the value of a list part contains the
 string ``%s``, then it is  interpreted as a literal browser command line to be
 used with the argument URL substituted for ``%s``; if the part does not contain
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1418,7 +1418,7 @@
    will not be usable in hashed collections.  If a class defines mutable objects
    and implements a :meth:`__cmp__` or :meth:`__eq__` method, it should not
    implement :meth:`__hash__`, since hashable collection implementations require
-   that a object's hash value is immutable (if the object's hash value changes,
+   that an object's hash value is immutable (if the object's hash value changes,
    it will be in the wrong hash bucket).
 
    User-defined classes have :meth:`__cmp__` and :meth:`__hash__` methods
diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
--- a/Doc/tutorial/errors.rst
+++ b/Doc/tutorial/errors.rst
@@ -345,7 +345,7 @@
 A *finally clause* is always executed before leaving the :keyword:`try`
 statement, whether an exception has occurred or not. When an exception has
 occurred in the :keyword:`try` clause and has not been handled by an
-:keyword:`except` clause (or it has occurred in a :keyword:`except` or
+:keyword:`except` clause (or it has occurred in an :keyword:`except` or
 :keyword:`else` clause), it is re-raised after the :keyword:`finally` clause has
 been executed.  The :keyword:`finally` clause is also executed "on the way out"
 when any other clause of the :keyword:`try` statement is left via a
diff --git a/Doc/whatsnew/2.1.rst b/Doc/whatsnew/2.1.rst
--- a/Doc/whatsnew/2.1.rst
+++ b/Doc/whatsnew/2.1.rst
@@ -555,7 +555,7 @@
 and experiment with them.  With the result experience, perhaps it'll be possible
 to design a really good catalog and then build support for it into Python 2.2.
 For example, the Distutils :command:`sdist` and :command:`bdist_\*` commands
-could support a ``upload`` option that would automatically upload your
+could support an ``upload`` option that would automatically upload your
 package to a catalog server.
 
 You can start creating packages containing :file:`PKG-INFO` even if you're not
diff --git a/Include/abstract.h b/Include/abstract.h
--- a/Include/abstract.h
+++ b/Include/abstract.h
@@ -94,7 +94,7 @@
   numeric, sequence, and mapping.  Each protocol consists of a
   collection of related operations.  If an operation that is not
   provided by a particular type is invoked, then a standard exception,
-  NotImplementedError is raised with a operation name as an argument.
+  NotImplementedError is raised with an operation name as an argument.
   In addition, for convenience this interface defines a set of
   constructors for building objects of built-in types.  This is needed
   so new objects can be returned from C functions that otherwise treat
diff --git a/Include/codecs.h b/Include/codecs.h
--- a/Include/codecs.h
+++ b/Include/codecs.h
@@ -146,14 +146,14 @@
        const char *encoding
        );
 
-/* Get a IncrementalEncoder object for the given encoding. */
+/* Get an IncrementalEncoder object for the given encoding. */
 
 PyAPI_FUNC(PyObject *) PyCodec_IncrementalEncoder(
        const char *encoding,
        const char *errors
        );
 
-/* Get a IncrementalDecoder object function for the given encoding. */
+/* Get an IncrementalDecoder object function for the given encoding. */
 
 PyAPI_FUNC(PyObject *) PyCodec_IncrementalDecoder(
        const char *encoding,
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -274,7 +274,7 @@
     Even though IOBase does not declare read, readinto, or write because
     their signatures will vary, implementations and clients should
     consider those methods part of the interface. Also, implementations
-    may raise a IOError when operations they do not support are called.
+    may raise an IOError when operations they do not support are called.
 
     The basic type used for binary data read from or written to a file is
     the bytes type. Method arguments may also be bytearray or memoryview of
diff --git a/Lib/chunk.py b/Lib/chunk.py
--- a/Lib/chunk.py
+++ b/Lib/chunk.py
@@ -21,7 +21,7 @@
 usage of the Chunk class defined here is to instantiate an instance at
 the start of each chunk and read from the instance until it reaches
 the end, after which a new instance can be instantiated.  At the end
-of the file, creating a new instance will fail with a EOFError
+of the file, creating a new instance will fail with an EOFError
 exception.
 
 Usage:
diff --git a/Lib/codecs.py b/Lib/codecs.py
--- a/Lib/codecs.py
+++ b/Lib/codecs.py
@@ -252,7 +252,7 @@
     """
     def __init__(self, errors='strict'):
         """
-        Creates a IncrementalDecoder instance.
+        Creates an IncrementalDecoder instance.
 
         The IncrementalDecoder may use different error handling schemes by
         providing the errors keyword argument. See the module docstring
@@ -1012,7 +1012,7 @@
     """
     Encoding iterator.
 
-    Encodes the input strings from the iterator using a IncrementalEncoder.
+    Encodes the input strings from the iterator using an IncrementalEncoder.
 
     errors and kwargs are passed through to the IncrementalEncoder
     constructor.
@@ -1030,7 +1030,7 @@
     """
     Decoding iterator.
 
-    Decodes the input strings from the iterator using a IncrementalDecoder.
+    Decodes the input strings from the iterator using an IncrementalDecoder.
 
     errors and kwargs are passed through to the IncrementalDecoder
     constructor.
diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
--- a/Lib/distutils/cygwinccompiler.py
+++ b/Lib/distutils/cygwinccompiler.py
@@ -347,7 +347,7 @@
 # class Mingw32CCompiler
 
 # Because these compilers aren't configured in Python's pyconfig.h file by
-# default, we should at least warn the user if he is using a unmodified
+# default, we should at least warn the user if he is using an unmodified
 # version.
 
 CONFIG_H_OK = "ok"
diff --git a/Lib/ftplib.py b/Lib/ftplib.py
--- a/Lib/ftplib.py
+++ b/Lib/ftplib.py
@@ -264,7 +264,7 @@
         return self.voidcmd(cmd)
 
     def sendeprt(self, host, port):
-        '''Send a EPRT command with the current host and the given port number.'''
+        '''Send an EPRT command with the current host and the given port number.'''
         af = 0
         if self.af == socket.AF_INET:
             af = 1
@@ -842,7 +842,7 @@
 
 
 def parse229(resp, peer):
-    '''Parse the '229' response for a EPSV request.
+    '''Parse the '229' response for an EPSV request.
     Raises error_proto if it does not contain '(|||port|)'
     Return ('host.addr.as.numbers', port#) tuple.'''
 
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -1384,7 +1384,7 @@
             text.see("insert")
             text.undo_block_stop()
 
-    # Our editwin provides a is_char_in_string function that works
+    # Our editwin provides an is_char_in_string function that works
     # with a Tk text index, but PyParse only knows about offsets into
     # a string. This builds a function for PyParse that accepts an
     # offset.
diff --git a/Lib/idlelib/ReplaceDialog.py b/Lib/idlelib/ReplaceDialog.py
--- a/Lib/idlelib/ReplaceDialog.py
+++ b/Lib/idlelib/ReplaceDialog.py
@@ -59,7 +59,7 @@
     def default_command(self, event=None):
         if self.do_find(self.ok):
             if self.do_replace():   # Only find next match if replace succeeded.
-                                    # A bad re can cause a it to fail.
+                                    # A bad re can cause it to fail.
                 self.do_find(0)
 
     def _replace_expand(self, m, repl):
diff --git a/Lib/io.py b/Lib/io.py
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -19,7 +19,7 @@
 Another IOBase subclass, TextIOBase, deals with the encoding and decoding
 of streams into text. TextIOWrapper, which extends it, is a buffered text
 interface to a buffered raw stream (`BufferedIOBase`). Finally, StringIO
-is a in-memory stream for text.
+is an in-memory stream for text.
 
 Argument names are not part of the specification, and only the arguments
 of open() are intended to be used as keyword arguments.
diff --git a/Lib/lib2to3/fixes/fix_input.py b/Lib/lib2to3/fixes/fix_input.py
--- a/Lib/lib2to3/fixes/fix_input.py
+++ b/Lib/lib2to3/fixes/fix_input.py
@@ -17,7 +17,7 @@
               """
 
     def transform(self, node, results):
-        # If we're already wrapped in a eval() call, we're done.
+        # If we're already wrapped in an eval() call, we're done.
         if context.match(node.parent.parent):
             return
 
diff --git a/Lib/msilib/schema.py b/Lib/msilib/schema.py
--- a/Lib/msilib/schema.py
+++ b/Lib/msilib/schema.py
@@ -733,7 +733,7 @@
 (u'CustomAction',u'Source',u'Y',None, None, None, None, u'CustomSource',None, u'The table reference of the source of the code.',),
 (u'CustomAction',u'Target',u'Y',None, None, None, None, u'Formatted',None, u'Execution parameter, depends on the type of custom action',),
 (u'DrLocator',u'Signature_',u'N',None, None, None, None, u'Identifier',None, u'The Signature_ represents a unique file signature and is also the foreign key in the Signature table.',),
-(u'DrLocator',u'Path',u'Y',None, None, None, None, u'AnyPath',None, u'The path on the user system. This is a either a subpath below the value of the Parent or a full path. The path may contain properties enclosed within [ ] that will be expanded.',),
+(u'DrLocator',u'Path',u'Y',None, None, None, None, u'AnyPath',None, u'The path on the user system. This is either a subpath below the value of the Parent or a full path. The path may contain properties enclosed within [ ] that will be expanded.',),
 (u'DrLocator',u'Depth',u'Y',0,32767,None, None, None, None, u'The depth below the path to which the Signature_ is recursively searched. If absent, the depth is assumed to be 0.',),
 (u'DrLocator',u'Parent',u'Y',None, None, None, None, u'Identifier',None, u'The parent file signature. It is also a foreign key in the Signature table. If null and the Path column does not expand to a full path, then all the fixed drives of the user system are searched using the Path.',),
 (u'DuplicateFile',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'Foreign key referencing the source file to be duplicated.',),
diff --git a/Lib/test/decimaltestdata/fma.decTest b/Lib/test/decimaltestdata/fma.decTest
--- a/Lib/test/decimaltestdata/fma.decTest
+++ b/Lib/test/decimaltestdata/fma.decTest
@@ -148,7 +148,7 @@
 fmax2019 fma -9.999999  9.999999  0E+999999  -> -100.000 Inexact Rounded
 fmax2020 fma -9.999999 -9.999999  0E+999999  ->  100.000 Inexact Rounded
 
--- 1999.12.21: next one is a edge case if intermediate longs are used
+-- 1999.12.21: next one is an edge case if intermediate longs are used
 precision: 15
 fmax2059 fma 999999999999 9765625  0E+999999  -> 9.76562499999023E+18 Inexact Rounded
 precision: 30
diff --git a/Lib/test/decimaltestdata/multiply.decTest b/Lib/test/decimaltestdata/multiply.decTest
--- a/Lib/test/decimaltestdata/multiply.decTest
+++ b/Lib/test/decimaltestdata/multiply.decTest
@@ -49,7 +49,7 @@
 mulx019 multiply -9.999999999  9.999999999 -> -100.000 Inexact Rounded
 mulx020 multiply -9.999999999 -9.999999999 ->  100.000 Inexact Rounded
 
--- 1999.12.21: next one is a edge case if intermediate longs are used
+-- 1999.12.21: next one is an edge case if intermediate longs are used
 precision: 15
 mulx059 multiply 999999999999 9765625 -> 9.76562499999023E+18 Inexact Rounded
 precision: 30
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -649,7 +649,7 @@
         except OSError as e:
             self.assertEqual(e.errno, errno.EBADF)
         else:
-            self.fail("%r didn't raise a OSError with a bad file descriptor"
+            self.fail("%r didn't raise an OSError with a bad file descriptor"
                       % f)
 
     @unittest.skipUnless(hasattr(os, 'isatty'), 'test needs os.isatty()')
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -196,7 +196,7 @@
         # The exponential backoff of the timeout amounts to a total
         # of ~1 second after which the deletion is probably an error
         # anyway.
-        # Testing on a i7 at 4.3GHz shows that usually only 1 iteration is
+        # Testing on an i7 at 4.3GHz shows that usually only 1 iteration is
         # required when contention occurs.
         timeout = 0.001
         while timeout < 1.0:
diff --git a/Lib/xmlrpclib.py b/Lib/xmlrpclib.py
--- a/Lib/xmlrpclib.py
+++ b/Lib/xmlrpclib.py
@@ -970,7 +970,7 @@
                   "unexpected type in multicall result"
 
 class MultiCall:
-    """server -> a object used to boxcar method calls
+    """server -> an object used to boxcar method calls
 
     server should be a ServerProxy object.
 
@@ -1334,7 +1334,7 @@
     ##
     # Create parser.
     #
-    # @return A 2-tuple containing a parser and a unmarshaller.
+    # @return A 2-tuple containing a parser and an unmarshaller.
 
     def getparser(self):
         # get parser and unmarshaller
diff --git a/Misc/HISTORY b/Misc/HISTORY
--- a/Misc/HISTORY
+++ b/Misc/HISTORY
@@ -388,7 +388,7 @@
 -----------------
 
 - Bug #1441486: The literal representation of -(sys.maxint - 1)
-  again evaluates to a int object, not a long.
+  again evaluates to an int object, not a long.
 
 - Bug #1501934: The scope of global variables that are locally assigned
   using augmented assignment is now correctly determined.
@@ -4295,7 +4295,7 @@
   interpreter executions, would fail.
 
 - "%c" % u"a" now returns a unicode string instead of raising a
-  TypeError. u"%c" % 0xffffffff now raises a OverflowError instead
+  TypeError. u"%c" % 0xffffffff now raises an OverflowError instead
   of a ValueError to be consistent with "%c" % 256. See SF patch #710127.
 
 Extension modules
@@ -12193,7 +12193,7 @@
 
 - The interfaces for the bind*() and unbind() widget methods have been
 redesigned; the bind*() methods now return the name of the Tcl command 
-created for the callback, and this can be passed as a optional
+created for the callback, and this can be passed as an optional
 argument to unbind() in order to delete the command (normally, such
 commands are automatically unbound when the widget is destroyed, but
 for some applications this isn't enough).
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1324,7 +1324,7 @@
 - Issue #22530: Allow the ``group()`` method of regular expression match objects
   to take a ``long`` as an index.
 
-- Issue #22517: When a io.BufferedRWPair object is deallocated, clear its
+- Issue #22517: When an io.BufferedRWPair object is deallocated, clear its
   weakrefs.
 
 - Issue #10510: distutils register and upload methods now use HTML standards
@@ -2989,7 +2989,7 @@
   created with PyFile_FromString().
 
 - Issue #14474: Save and restore exception state in thread.start_new_thread()
-  while writing error message if the thread leaves a unhandled exception.
+  while writing error message if the thread leaves an unhandled exception.
 
 - Issue #13019: Fix potential reference leaks in bytearray.extend().  Patch
   by Suman Saha.
@@ -3965,7 +3965,7 @@
 - Issues #12610 and #12609: Verify that user generated AST has correct string
   and identifier types before compiling.
 
-- Issue #11627: Fix segfault when __new__ on a exception returns a
+- Issue #11627: Fix segfault when __new__ on an exception returns a
   non-exception class.
 
 - Issue #12149: Update the method cache after a type's dictionnary gets
@@ -4281,7 +4281,7 @@
 
 - Issue #12502: asyncore: fix polling loop with AF_UNIX sockets.
 
-- Issue #4376: ctypes now supports nested structures in a endian different than
+- Issue #4376: ctypes now supports nested structures in an endian different than
   the parent structure. Patch by Vlad Riscutia.
 
 - Issue #12493: subprocess: Popen.communicate() now also handles EINTR errors
@@ -6697,7 +6697,7 @@
 
 - Issue #7610: Reworked implementation of the internal ``zipfile.ZipExtFile``
   class used to represent files stored inside an archive.  The new
-  implementation is significantly faster and can be wrapped in a
+  implementation is significantly faster and can be wrapped in an
   ``io.BufferedReader`` object for more speedups.  It also solves an issue
   where interleaved calls to ``read()`` and ``readline()`` give wrong results.
   Patch by Nir Aides.
@@ -7952,7 +7952,7 @@
   mulitiprocessing.manager so that users can install custom handlers/etc.
 
 - Issue #3551: Patch multiprocessing to raise a proper exception if the size of
-  the object when writefile is called causes a ERROR_NO_SYSTEM_RESOURCES.  Added
+  the object when writefile is called causes an ERROR_NO_SYSTEM_RESOURCES.  Added
   docs to note the limitation.
 
 - unittest.assertNotEqual() now uses the inequality operator (!=) instead of the
diff --git a/Misc/cheatsheet b/Misc/cheatsheet
--- a/Misc/cheatsheet
+++ b/Misc/cheatsheet
@@ -953,7 +953,7 @@
                     instanceobject as arg, returns list of names in its attr.
                     dict.
 divmod(a,b)         Returns tuple of (a/b, a%b)
-enumerate(seq)      Return a iterator giving:  (0, seq[0]), (1, seq[1]), ...
+enumerate(seq)      Return an iterator giving:  (0, seq[0]), (1, seq[1]), ...
 eval(s[, globals[,  Eval string s in (optional) globals, locals contexts.s must
 locals]])           have no NUL's or newlines. s can also be acode object.
                     Example: x = 1; incr_x = eval('x + 1')
diff --git a/Modules/_ctypes/libffi/src/x86/darwin64.S b/Modules/_ctypes/libffi/src/x86/darwin64.S
--- a/Modules/_ctypes/libffi/src/x86/darwin64.S
+++ b/Modules/_ctypes/libffi/src/x86/darwin64.S
@@ -350,7 +350,7 @@
 	.set	L$set$3,LUW1-LUW0
 	.long	L$set$3
 
-	/* New stack frame based off rbp.  This is a itty bit of unwind
+	/* New stack frame based off rbp.  This is an itty bit of unwind
 	   trickery in that the CFA *has* changed.  There is no easy way
 	   to describe it correctly on entry to the function.  Fortunately,
 	   it doesn't matter too much since at all points we can correctly
diff --git a/Modules/_ctypes/libffi/src/x86/unix64.S b/Modules/_ctypes/libffi/src/x86/unix64.S
--- a/Modules/_ctypes/libffi/src/x86/unix64.S
+++ b/Modules/_ctypes/libffi/src/x86/unix64.S
@@ -366,7 +366,7 @@
 	.byte	0x4			/* DW_CFA_advance_loc4 */
 	.long	.LUW1-.LUW0
 
-	/* New stack frame based off rbp.  This is a itty bit of unwind
+	/* New stack frame based off rbp.  This is an itty bit of unwind
 	   trickery in that the CFA *has* changed.  There is no easy way
 	   to describe it correctly on entry to the function.  Fortunately,
 	   it doesn't matter too much since at all points we can correctly
diff --git a/Modules/_ctypes/libffi_osx/x86/darwin64.S b/Modules/_ctypes/libffi_osx/x86/darwin64.S
--- a/Modules/_ctypes/libffi_osx/x86/darwin64.S
+++ b/Modules/_ctypes/libffi_osx/x86/darwin64.S
@@ -351,7 +351,7 @@
  .set  L$set$3,LUW1-LUW0
  .long L$set$3
 
- /* New stack frame based off rbp.  This is a itty bit of unwind
+ /* New stack frame based off rbp.  This is an itty bit of unwind
     trickery in that the CFA *has* changed.  There is no easy way
     to describe it correctly on entry to the function.  Fortunately,
     it doesn't matter too much since at all points we can correctly
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
--- a/Modules/_hashopenssl.c
+++ b/Modules/_hashopenssl.c
@@ -730,7 +730,7 @@
     if (openssl_obj_name == NULL)
         return;
     /* Ignore aliased names, they pollute the list and OpenSSL appears to
-     * have a its own definition of alias as the resulting list still
+     * have its own definition of alias as the resulting list still
      * contains duplicate and alternate names for several algorithms.     */
     if (openssl_obj_name->alias)
         return;
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
--- a/Modules/_io/_iomodule.c
+++ b/Modules/_io/_iomodule.c
@@ -74,7 +74,7 @@
 "Another IOBase subclass, TextIOBase, deals with the encoding and decoding\n"
 "of streams into text. TextIOWrapper, which extends it, is a buffered text\n"
 "interface to a buffered raw stream (`BufferedIOBase`). Finally, StringIO\n"
-"is a in-memory stream for text.\n"
+"is an in-memory stream for text.\n"
 "\n"
 "Argument names are not part of the specification, and only the arguments\n"
 "of open() are intended to be used as keyword arguments.\n"
diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c
--- a/Modules/_io/iobase.c
+++ b/Modules/_io/iobase.c
@@ -35,7 +35,7 @@
     "Even though IOBase does not declare read, readinto, or write because\n"
     "their signatures will vary, implementations and clients should\n"
     "consider those methods part of the interface. Also, implementations\n"
-    "may raise a IOError when operations they do not support are called.\n"
+    "may raise an IOError when operations they do not support are called.\n"
     "\n"
     "The basic type used for binary data read from or written to a file is\n"
     "the bytes type. Method arguments may also be bytearray or memoryview\n"
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -881,8 +881,8 @@
             if (self->encoding == NULL) {
               catch_ImportError:
                 /*
-                 Importing locale can raise a ImportError because of
-                 _functools, and locale.getpreferredencoding can raise a
+                 Importing locale can raise an ImportError because of
+                 _functools, and locale.getpreferredencoding can raise an
                  ImportError if _locale is not available.  These will happen
                  during module building.
                 */
diff --git a/Modules/audioop.c b/Modules/audioop.c
--- a/Modules/audioop.c
+++ b/Modules/audioop.c
@@ -121,7 +121,7 @@
 
 /*
  * linear2ulaw() accepts a 14-bit signed integer and encodes it as u-law data
- * stored in a unsigned char.  This function should only be called with
+ * stored in an unsigned char.  This function should only be called with
  * the data shifted such that it only contains information in the lower
  * 14-bits.
  *
diff --git a/Modules/expat/pyexpatns.h b/Modules/expat/pyexpatns.h
--- a/Modules/expat/pyexpatns.h
+++ b/Modules/expat/pyexpatns.h
@@ -21,7 +21,7 @@
  *
  *
  * The Solution:
- * Prefix all a exported symbols with "PyExpat_". This is similar to
+ * Prefix all exported symbols with "PyExpat_". This is similar to
  * what Mozilla does for some common libs:
  * http://lxr.mozilla.org/seamonkey/source/modules/libimg/png/mozpngconf.h#115
  *
diff --git a/Modules/readline.c b/Modules/readline.c
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -1144,7 +1144,7 @@
         return NULL;
     }
 
-    /* We got an EOF, return a empty string. */
+    /* We got an EOF, return an empty string. */
     if (p == NULL) {
         p = PyMem_Malloc(1);
         if (p != NULL)
diff --git a/Objects/abstract.c b/Objects/abstract.c
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -1641,7 +1641,7 @@
         }
         return res;
     }
-    if (PyInt_Check(o)) { /* A int subclass without nb_int */
+    if (PyInt_Check(o)) { /* An int subclass without nb_int */
         PyIntObject *io = (PyIntObject*)o;
         return PyInt_FromLong(io->ob_ival);
     }
diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c
--- a/PC/msvcrtmodule.c
+++ b/PC/msvcrtmodule.c
@@ -148,7 +148,7 @@
     if (handle == -1)
         return PyErr_SetFromErrno(PyExc_IOError);
 
-    /* technically 'handle' is not a pointer, but a integer as
+    /* technically 'handle' is not a pointer, but an integer as
        large as a pointer, Python's *VoidPtr interface is the
        most appropriate here */
     return PyLong_FromVoidPtr((void*)handle);
diff --git a/PC/os2emx/Makefile b/PC/os2emx/Makefile
--- a/PC/os2emx/Makefile
+++ b/PC/os2emx/Makefile
@@ -102,7 +102,7 @@
   CFLAGS+=	-DPREFIX=$(DQUOTE)$(LIB_DIR)$(DQUOTE)
 endif
 
-# We're using the OMF format since EMX's ld has a obscure bug
+# We're using the OMF format since EMX's ld has an obscure bug
 # because of which it sometimes fails to build relocations
 # in .data segment that point to another .data locations
 # (except for the final linking if the .EXEs)
diff --git a/Python/thread.c b/Python/thread.c
--- a/Python/thread.c
+++ b/Python/thread.c
@@ -50,7 +50,7 @@
    threads.
 
    This is valid for HP-UX 11.23 running on an ia64 system. If needed, add
-   a check of __ia64 to verify that we're running on a ia64 system instead
+   a check of __ia64 to verify that we're running on an ia64 system instead
    of a pa-risc system.
 */
 #ifdef __hpux
diff --git a/Tools/msi/schema.py b/Tools/msi/schema.py
--- a/Tools/msi/schema.py
+++ b/Tools/msi/schema.py
@@ -733,7 +733,7 @@
 (u'CustomAction',u'Source',u'Y',None, None, None, None, u'CustomSource',None, u'The table reference of the source of the code.',),
 (u'CustomAction',u'Target',u'Y',None, None, None, None, u'Formatted',None, u'Execution parameter, depends on the type of custom action',),
 (u'DrLocator',u'Signature_',u'N',None, None, None, None, u'Identifier',None, u'The Signature_ represents a unique file signature and is also the foreign key in the Signature table.',),
-(u'DrLocator',u'Path',u'Y',None, None, None, None, u'AnyPath',None, u'The path on the user system. This is a either a subpath below the value of the Parent or a full path. The path may contain properties enclosed within [ ] that will be expanded.',),
+(u'DrLocator',u'Path',u'Y',None, None, None, None, u'AnyPath',None, u'The path on the user system. This is either a subpath below the value of the Parent or a full path. The path may contain properties enclosed within [ ] that will be expanded.',),
 (u'DrLocator',u'Depth',u'Y',0,32767,None, None, None, None, u'The depth below the path to which the Signature_ is recursively searched. If absent, the depth is assumed to be 0.',),
 (u'DrLocator',u'Parent',u'Y',None, None, None, None, u'Identifier',None, u'The parent file signature. It is also a foreign key in the Signature table. If null and the Path column does not expand to a full path, then all the fixed drives of the user system are searched using the Path.',),
 (u'DuplicateFile',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'Foreign key referencing the source file to be duplicated.',),
diff --git a/Tools/msi/uisample.py b/Tools/msi/uisample.py
--- a/Tools/msi/uisample.py
+++ b/Tools/msi/uisample.py
@@ -998,7 +998,7 @@
 (u'CustomAction', u'Source', u'Y', None, None, None, None, u'CustomSource', None, u'The table reference of the source of the code.'),
 (u'CustomAction', u'Target', u'Y', None, None, None, None, u'Formatted', None, u'Execution parameter, depends on the type of custom action'),
 (u'DrLocator', u'Signature_', u'N', None, None, None, None, u'Identifier', None, u'The Signature_ represents a unique file signature and is also the foreign key in the Signature table.'),
-(u'DrLocator', u'Path', u'Y', None, None, None, None, u'AnyPath', None, u'The path on the user system. This is a either a subpath below the value of the Parent or a full path. The path may contain properties enclosed within [ ] that will be expanded.'),
+(u'DrLocator', u'Path', u'Y', None, None, None, None, u'AnyPath', None, u'The path on the user system. This is either a subpath below the value of the Parent or a full path. The path may contain properties enclosed within [ ] that will be expanded.'),
 (u'DrLocator', u'Depth', u'Y', 0, 32767, None, None, None, None, u'The depth below the path to which the Signature_ is recursively searched. If absent, the depth is assumed to be 0.'),
 (u'DrLocator', u'Parent', u'Y', None, None, None, None, u'Identifier', None, u'The parent file signature. It is also a foreign key in the Signature table. If null and the Path column does not expand to a full path, then all the fixed drives of the user system are searched using the Path.'),
 (u'DuplicateFile', u'File_', u'N', None, None, u'File', 1, u'Identifier', None, u'Foreign key referencing the source file to be duplicated.'),

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list