]> granicus.if.org Git - python/commitdiff
Issue #26778: Fixed "a/an/and" typos in code comment and documentation.
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 17 Apr 2016 05:32:47 +0000 (08:32 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 17 Apr 2016 05:32:47 +0000 (08:32 +0300)
64 files changed:
Doc/c-api/set.rst
Doc/c-api/unicode.rst
Doc/distutils/apiref.rst
Doc/library/asyncio-eventloop.rst
Doc/library/ctypes.rst
Doc/library/idle.rst
Doc/library/shutil.rst
Doc/library/tarfile.rst
Doc/library/tkinter.tix.rst
Doc/tutorial/datastructures.rst
Doc/whatsnew/2.2.rst
Doc/whatsnew/3.4.rst
Include/listobject.h
Include/unicodeobject.h
Lib/_pydecimal.py
Lib/_pyio.py
Lib/asyncio/selector_events.py
Lib/email/_header_value_parser.py
Lib/email/headerregistry.py
Lib/idlelib/AutoComplete.py
Lib/idlelib/Debugger.py
Lib/idlelib/WidgetRedirector.py
Lib/idlelib/configDialog.py
Lib/lib2to3/fixer_base.py
Lib/lib2to3/refactor.py
Lib/lzma.py
Lib/mailbox.py
Lib/multiprocessing/managers.py
Lib/optparse.py
Lib/pprint.py
Lib/socket.py
Lib/socketserver.py
Lib/sqlite3/test/regression.py
Lib/tarfile.py
Lib/test/test_asyncio/test_selector_events.py
Lib/test/test_asyncio/test_sslproto.py
Lib/test/test_binop.py
Lib/test/test_faulthandler.py
Lib/test/test_pathlib.py
Lib/test/test_sys.py
Lib/test/test_threading.py
Lib/test/test_tools/test_gprof2html.py
Lib/test/test_zipapp.py
Lib/tkinter/__init__.py
Lib/tkinter/dnd.py
Lib/tkinter/test/test_ttk/test_functions.py
Lib/tkinter/tix.py
Lib/tkinter/ttk.py
Lib/xmlrpc/client.py
Lib/zipapp.py
Misc/HISTORY
Misc/NEWS
Modules/_csv.c
Modules/_ctypes/_ctypes.c
Modules/_pickle.c
Modules/_tracemalloc.c
Modules/faulthandler.c
Modules/itertoolsmodule.c
Objects/bytearrayobject.c
Objects/rangeobject.c
Objects/stringlib/unicode_format.h
PC/clinic/winreg.c.h
PC/winreg.c
Python/thread_nt.h

index 7f4d534a700dae4bb9e2b93f7a11fd1f8f6bea35..8de0394112e9cea705d8eb93a14702eb6254b75f 100644 (file)
@@ -128,7 +128,7 @@ or :class:`frozenset` or instances of their subtypes.
    of brand new frozensets before they are exposed to other code).  Return 0 on
    success or -1 on failure. Raise a :exc:`TypeError` if the *key* is
    unhashable. Raise a :exc:`MemoryError` if there is no room to grow.  Raise a
-   :exc:`SystemError` if *set* is an not an instance of :class:`set` or its
+   :exc:`SystemError` if *set* is not an instance of :class:`set` or its
    subtype.
 
 
@@ -142,7 +142,7 @@ subtypes but not for instances of :class:`frozenset` or its subtypes.
    error is encountered.  Does not raise :exc:`KeyError` for missing keys.  Raise a
    :exc:`TypeError` if the *key* is unhashable.  Unlike the Python :meth:`~set.discard`
    method, this function does not automatically convert unhashable sets into
-   temporary frozensets. Raise :exc:`PyExc_SystemError` if *set* is an not an
+   temporary frozensets. Raise :exc:`PyExc_SystemError` if *set* is not an
    instance of :class:`set` or its subtype.
 
 
@@ -150,7 +150,7 @@ subtypes but not for instances of :class:`frozenset` or its subtypes.
 
    Return a new reference to an arbitrary object in the *set*, and removes the
    object from the *set*.  Return *NULL* on failure.  Raise :exc:`KeyError` if the
-   set is empty. Raise a :exc:`SystemError` if *set* is an not an instance of
+   set is empty. Raise a :exc:`SystemError` if *set* is not an instance of
    :class:`set` or its subtype.
 
 
index 1ed81403b4f87a7b4b80112fd4a310741b0bd5b5..0b45958793dec95c8d260a9b79604066cc4e4f7d 100644 (file)
@@ -367,7 +367,7 @@ These APIs can be used to work with surrogates:
 
 .. c:macro:: Py_UNICODE_IS_HIGH_SURROGATE(ch)
 
-   Check if *ch* is an high surrogate (``0xD800 <= ch <= 0xDBFF``).
+   Check if *ch* is a high surrogate (``0xD800 <= ch <= 0xDBFF``).
 
 .. c:macro:: Py_UNICODE_IS_LOW_SURROGATE(ch)
 
@@ -450,7 +450,7 @@ APIs:
    | :attr:`%%`        | *n/a*               | The literal % character.       |
    +-------------------+---------------------+--------------------------------+
    | :attr:`%c`        | int                 | A single character,            |
-   |                   |                     | represented as an C int.       |
+   |                   |                     | represented as a C int.        |
    +-------------------+---------------------+--------------------------------+
    | :attr:`%d`        | int                 | Exactly equivalent to          |
    |                   |                     | ``printf("%d")``.              |
index e66835a811402cb2ac47090720e743d6ad13e0bc..7d6a84e159a2d0a9e5ceb22cfa3a67ffdc27f4ce 100644 (file)
@@ -837,7 +837,7 @@ selection by :class:`MSVCCompiler`.
 .. module:: distutils.bcppcompiler
 
 
-This module provides :class:`BorlandCCompiler`, an subclass of the abstract
+This module provides :class:`BorlandCCompiler`, a subclass of the abstract
 :class:`CCompiler` class for the Borland C++ compiler.
 
 
index 659b37c06e6e8ff6c19d93482ea9ee485037db0c..f68b19d8676e5b3fa2770eea234c54e3896089bc 100644 (file)
@@ -513,7 +513,7 @@ Low-level socket operations
 
    The *address* must be already resolved to avoid the trap of hanging the
    entire event loop when the address requires doing a DNS lookup.  For
-   example, it must be an IP address, not an hostname, for
+   example, it must be an IP address, not a hostname, for
    :py:data:`~socket.AF_INET` and :py:data:`~socket.AF_INET6` address families.
    Use :meth:`getaddrinfo` to resolve the hostname asynchronously.
 
index 828d7ca4a36d67639734739f0aba9cf8f6f3070b..e2a18c1db18ff7cb479317919b60d3fb18d4316d 100644 (file)
@@ -671,7 +671,7 @@ positive integer::
 
    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 *
@@ -1888,7 +1888,7 @@ Utility functions
 .. 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.
 
 
index 4384d56814e1e61ff0972c0f19c7d52b7a84639a..df08fe8b5b12ee50575c9ae5e62a2efd4dda83c6 100644 (file)
@@ -128,7 +128,7 @@ Find Selection
    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.
index 904627f431b13c2dd8b76689eaad5da5eb45883a..c39a19abc9dff32cfa25b7848dd2df8dd75f5f9b 100644 (file)
@@ -342,7 +342,7 @@ Directory and files operations
    Return the path to an executable which would be run if the given *cmd* was
    called.  If no *cmd* would be called, return ``None``.
 
-   *mode* is a permission mask passed to :func:`os.access`, by default
+   *mode* is a permission mask passed to :func:`os.access`, by default
    determining if the file exists and executable.
 
    When no *path* is specified, the results of :func:`os.environ` are used,
index 5fa4787a0c1dd5f5b551ee660403fb3422c91bf8..bf90fc40c934288545870bf54f00377b4d4a4056 100644 (file)
@@ -129,7 +129,7 @@ Some facts and figures:
    | ``'r|bz2'`` | Open a bzip2 compressed *stream* for       |
    |             | reading.                                   |
    +-------------+--------------------------------------------+
-   | ``'r|xz'``  | Open a lzma compressed *stream* for        |
+   | ``'r|xz'``  | Open an lzma compressed *stream* for       |
    |             | reading.                                   |
    +-------------+--------------------------------------------+
    | ``'w|'``    | Open an uncompressed *stream* for writing. |
index 9de73ade421ea868182a59bbfeb81f9b6a79a9b4..9da79596a6a68cddb90320829588c1cf0ca43f05 100644 (file)
@@ -267,7 +267,7 @@ File Selectors
 
    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.
index 0d51480177d882f9519a0d578c324fdd72fe0921..b39bdf4dfb288be92a6bb5120596dc681221295e 100644 (file)
@@ -397,7 +397,7 @@ objects, such as lists.
 
 Though tuples may seem similar to lists, they are often used in different
 situations and for different purposes.
-Tuples are :term:`immutable`, and usually contain an heterogeneous sequence of
+Tuples are :term:`immutable`, and usually contain a heterogeneous sequence of
 elements that are accessed via unpacking (see later in this section) or indexing
 (or even by attribute in the case of :func:`namedtuples <collections.namedtuple>`).
 Lists are :term:`mutable`, and their elements are usually homogeneous and are
index 603c63de4a9aa1fc8216ccdc2b557ef73c66d0de..75e176c29a69679072bf3e30021e45f8ab5553b8 100644 (file)
@@ -720,7 +720,7 @@ possible types of the operands.
 
 (The controversy is over whether this is *really* a design flaw, and whether
 it's worth breaking existing code to fix this.  It's caused endless discussions
-on python-dev, and in July 2001 erupted into an storm of acidly sarcastic
+on python-dev, and in July 2001 erupted into a storm of acidly sarcastic
 postings on :newsgroup:`comp.lang.python`. I won't argue for either side here
 and will stick to describing what's  implemented in 2.2.  Read :pep:`238` for a
 summary of arguments and counter-arguments.)
index ca7716a18ff35d54635cd3c8d38716155b0093f0..fdca922d1048e0ae18ea234f36cc98e648f972ab 100644 (file)
@@ -1457,7 +1457,7 @@ s), as well as a :meth:`~ssl.SSLContext.get_ca_certs` method that returns a
 list of the loaded ``CA`` certificates.  (Contributed by Christian Heimes in
 :issue:`18147`.)
 
-If OpenSSL 0.9.8 or later is available, :class:`~ssl.SSLContext` has an new
+If OpenSSL 0.9.8 or later is available, :class:`~ssl.SSLContext` has a new
 attribute :attr:`~ssl.SSLContext.verify_flags` that can be used to control the
 certificate verification process by setting it to some combination of the new
 constants :data:`~ssl.VERIFY_DEFAULT`, :data:`~ssl.VERIFY_CRL_CHECK_LEAF`,
index daa513f1514b92a2279f64379eb7b8f9f2a9a694..31843b5db08c1ac0563ac40b7d4964d3b3aeb63c 100644 (file)
@@ -2,7 +2,7 @@
 /* List object interface */
 
 /*
-Another generally useful object type is an list of object pointers.
+Another generally useful object type is a list of object pointers.
 This is a mutable type: the list items can be changed, and items can be
 added or removed.  Out-of-range indices or non-list objects are ignored.
 
index ea4591d598f31540932746e9921be850ae32802e..533dd75d2c7902a8dc3d1561a0deffd04daa4f7b 100644 (file)
@@ -844,7 +844,7 @@ PyAPI_FUNC(int) PyUnicode_Resize(
     Py_ssize_t length           /* New length */
     );
 
-/* Decode obj to an Unicode object.
+/* Decode obj to a Unicode object.
 
    bytes, bytearray and other bytes-like objects are decoded according to the
    given encoding and error handler. The encoding and error handler can be
index 05ba4eeee3a5de44ebf3c0366059303e44ffe6e8..6b13d449082e2e66d96e02f45e96c42959868070 100644 (file)
@@ -252,7 +252,7 @@ class InvalidOperation(DecimalException):
 class ConversionSyntax(InvalidOperation):
     """Trying to convert badly formed string.
 
-    This occurs and signals invalid-operation if an string is being
+    This occurs and signals invalid-operation if a string is being
     converted to a number and it does not conform to the numeric string
     syntax.  The result is [0,qNaN].
     """
index a467ddda4ff3f5e858cb734d89a2a676a76e34e0..313fadfcbeb07d6d2e81f088fd16d7ea775cf510 100644 (file)
@@ -439,7 +439,7 @@ class IOBase(metaclass=abc.ABCMeta):
         return self.__closed
 
     def _checkClosed(self, msg=None):
-        """Internal: raise an ValueError if file is closed
+        """Internal: raise a ValueError if file is closed
         """
         if self.closed:
             raise ValueError("I/O operation on closed file."
index 7b1eef20f225af6f1b708945c584b34a6fdcf2db..7b5a084daec99e32fd9bd727cb98a887c6254984 100644 (file)
@@ -387,7 +387,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
 
         The address must be already resolved to avoid the trap of hanging the
         entire event loop when the address requires doing a DNS lookup. For
-        example, it must be an IP address, not an hostname, for AF_INET and
+        example, it must be an IP address, not a hostname, for AF_INET and
         AF_INET6 address families. Use getaddrinfo() to resolve the hostname
         asynchronously.
 
index f264191dc4a4452404e2d38bfa11bfdfd6b9c5c3..a7ce30e177e467106e6a541a477b6f780a91d90c 100644 (file)
@@ -1522,7 +1522,7 @@ def get_qp_ctext(value):
     This is not the RFC ctext, since we are handling nested comments in comment
     and unquoting quoted-pairs here.  We allow anything except the '()'
     characters, but if we find any ASCII other than the RFC defined printable
-    ASCII an NonPrintableDefect is added to the token's defects list.  Since
+    ASCII, a NonPrintableDefect is added to the token's defects list.  Since
     quoted pairs are converted to their unquoted values, what is returned is
     a 'ptext' token.  In this case it is a WhiteSpaceTerminal, so it's value
     is ' '.
@@ -1537,7 +1537,7 @@ def get_qcontent(value):
     """qcontent = qtext / quoted-pair
 
     We allow anything except the DQUOTE character, but if we find any ASCII
-    other than the RFC defined printable ASCII an NonPrintableDefect is
+    other than the RFC defined printable ASCII, a NonPrintableDefect is
     added to the token's defects list.  Any quoted pairs are converted to their
     unquoted values, so what is returned is a 'ptext' token.  In this case it
     is a ValueTerminal.
@@ -1882,7 +1882,7 @@ def get_dtext(value):
         obs-dtext = obs-NO-WS-CTL / quoted-pair
 
     We allow anything except the excluded characters, but if we find any
-    ASCII other than the RFC defined printable ASCII an NonPrintableDefect is
+    ASCII other than the RFC defined printable ASCII, a NonPrintableDefect is
     added to the token's defects list.  Quoted pairs are converted to their
     unquoted values, so what is returned is a ptext token, in this case a
     ValueTerminal.  If there were quoted-printables, an ObsoleteHeaderDefect is
index 4e142ee8dc9b1f227d423a601427043f89ef2f18..0fc2231e5cbd2949033523b101bfd493ed440537 100644 (file)
@@ -109,7 +109,7 @@ class Group:
     def __init__(self, display_name=None, addresses=None):
         """Create an object representing an address group.
 
-        An address group consists of a display_name followed by colon and an
+        An address group consists of a display_name followed by colon and a
         list of addresses (see Address) terminated by a semi-colon.  The Group
         is created by specifying a display_name and a possibly empty list of
         Address objects.  A Group can also be used to represent a single
index b20512dfa0f3ed87e8b8f4c12709fb89d620e55b..b9ec539e68d4eb13be573a5341a439f253dd9999 100644 (file)
@@ -64,7 +64,7 @@ class AutoComplete:
 
     def try_open_completions_event(self, event):
         """Happens when it would be nice to open a completion list, but not
-        really necessary, for example after an dot, so function
+        really necessary, for example after a dot, so function
         calls won't be made.
         """
         lastchar = self.text.get("insert-1c")
index 250422edbb1517427918847e0ae1e8f8f0880ebf..d5e217dde9b78e20d9426eedb1cc13f0dd9bf225 100644 (file)
@@ -372,7 +372,7 @@ class StackViewer(ScrolledList):
     def __init__(self, master, flist, gui):
         if macosxSupport.isAquaTk():
             # At least on with the stock AquaTk version on OSX 10.4 you'll
-            # get an shaking GUI that eventually kills IDLE if the width
+            # get a shaking GUI that eventually kills IDLE if the width
             # argument is specified.
             ScrolledList.__init__(self, master)
         else:
index 67d7f61e623b4289bf55de2c641affd63b60e681..b66be9e721a51595b5f021e0e4bbe78a61e41e34 100644 (file)
@@ -68,7 +68,7 @@ class WidgetRedirector:
         '''Return OriginalCommand(operation) after registering function.
 
         Registration adds an operation: function pair to ._operations.
-        It also adds an widget function attribute that masks the tkinter
+        It also adds a widget function attribute that masks the tkinter
         class instance method.  Method masking operates independently
         from command dispatch.
 
index 9b16459d546f8857445626a66ff6bb75143b8b9b..f00db39d8ffeb350f805d3b39ee3e8a47fada3c5 100644 (file)
@@ -1196,7 +1196,7 @@ class ConfigDialog(Toplevel):
 
         All values are treated as text, and it is up to the user to supply
         reasonable values. The only exception to this are the 'enable*' options,
-        which are boolean, and can be toggled with an True/False button.
+        which are boolean, and can be toggled with a True/False button.
         """
         parent = self.parent
         frame = self.tabPages.pages['Extensions'].frame
index b1760561996ed1d8fada89afaacfd66eeaa2d090..1ce62fec1573aabaceb061b33f9a8f60891e4e2b 100644 (file)
@@ -49,7 +49,7 @@ class BaseFix(object):
         """Initializer.  Subclass may override.
 
         Args:
-            options: an dict containing the options passed to RefactoringTool
+            options: a dict containing the options passed to RefactoringTool
             that could be used to customize the fixer through the command line.
             log: a list to append warnings and other messages to.
         """
index adf999684beaeacce53e09d881c3d6dce770e9cd..0728083652da3aec25527bdb3711886e404f4d64 100644 (file)
@@ -184,7 +184,7 @@ class RefactoringTool(object):
 
         Args:
             fixer_names: a list of fixers to import
-            options: an dict with configuration.
+            options: a dict with configuration.
             explicit: a list of fixers to run even if they are explicit.
         """
         self.fixers = fixer_names
index 89528b60ce7c9d8e0385a30d288c22f707ed85c2..7dff1c319a6c251f27c302ce9ee8aa3440ffc714 100644 (file)
@@ -279,7 +279,7 @@ def open(filename, mode="rb", *,
     constructor: LZMAFile(filename, mode, ...). In this case, the
     encoding, errors and newline arguments must not be provided.
 
-    For text mode, a LZMAFile object is created, and wrapped in an
+    For text mode, an LZMAFile object is created, and wrapped in an
     io.TextIOWrapper instance with the specified encoding, error
     handling behavior, and line ending(s).
 
index 24d4aec8a48ff377ba89f7d809071a5108da196f..0270e25b0088eca9ff52f023be3435555f6bf380 100644 (file)
@@ -1821,7 +1821,7 @@ class BabylMessage(Message):
     _type_specific_attributes = ['_labels', '_visible']
 
     def __init__(self, message=None):
-        """Initialize an BabylMessage instance."""
+        """Initialize a BabylMessage instance."""
         self._labels = []
         self._visible = Message()
         Message.__init__(self, message)
index 776656ea176a2a6868eb4b66273ea6840f589a3d..c559b55a3fde03efeef88b766c7261fd8a60b65d 100644 (file)
@@ -842,7 +842,7 @@ def RebuildProxy(func, token, serializer, kwds):
 
 def MakeProxyType(name, exposed, _cache={}):
     '''
-    Return an proxy type whose methods are given by `exposed`
+    Return a proxy type whose methods are given by `exposed`
     '''
     exposed = tuple(exposed)
     try:
index 432a2eb9b66bd2735859d3d44ba40c5951f591b8..5bc905166bec49a4fddbeccff3e711cddebbbd49 100644 (file)
@@ -1361,7 +1361,7 @@ class OptionParser (OptionContainer):
         sys.argv[1:]).  Any errors result in a call to 'error()', which
         by default prints the usage message to stderr and calls
         sys.exit() with an error message.  On success returns a pair
-        (values, args) where 'values' is an Values instance (with all
+        (values, args) where 'values' is a Values instance (with all
         your option values) and 'args' is the list of arguments left
         over after parsing options.
         """
index 87649b48cdfab47f93203d7864d11e70a8a11364..bcf2eedebe6b546a9cab0442d68a8e4b3ae57195 100644 (file)
@@ -72,7 +72,7 @@ def isrecursive(object):
 class _safe_key:
     """Helper function for key functions when sorting unorderable objects.
 
-    The wrapped-object will fallback to an Py2.x style comparison for
+    The wrapped-object will fallback to a Py2.x style comparison for
     unorderable types (sorting first comparing the type name and then by
     the obj ids).  Does not work recursively, so dict.items() must have
     _safe_key applied to both the key and the value.
index 95ce9eb61ca443d4f6cc249a9d7c39b48d6851b0..ac2e3dd0fa737e451a72819591b922aaac68fa19 100644 (file)
@@ -685,7 +685,7 @@ def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
     global default timeout setting returned by :func:`getdefaulttimeout`
     is used.  If *source_address* is set it must be a tuple of (host, port)
     for the socket to bind as a source address before making the connection.
-    An host of '' or port 0 tells the OS to use the default.
+    A host of '' or port 0 tells the OS to use the default.
     """
 
     host, port = address
index f8e87e64edc07393f347302d40a6f6849f21dc11..88088130ee4e998b1b683982c700fa0fc9ce0127 100644 (file)
@@ -736,7 +736,7 @@ class StreamRequestHandler(BaseRequestHandler):
             try:
                 self.wfile.flush()
             except socket.error:
-                # An final socket error may have occurred here, such as
+                # A final socket error may have occurred here, such as
                 # the local error ECONNABORTED.
                 pass
         self.wfile.close()
index eaaaa2c528eb05234bad702a657d504a7f035139..11adb300d8fd4fbfc4e0f6e36cefab7da53e7aee 100644 (file)
@@ -73,7 +73,7 @@ class RegressionTests(unittest.TestCase):
     def CheckStatementFinalizationOnCloseDb(self):
         # pysqlite versions <= 2.3.3 only finalized statements in the statement
         # cache when closing the database. statements that were still
-        # referenced in cursors weren't closed an could provoke "
+        # referenced in cursors weren't closed and could provoke "
         # "OperationalError: Unable to close due to unfinalised statements".
         con = sqlite.connect(":memory:")
         cursors = []
index 25845604f34bb63d1e2b1c8adff29a346aaebb94..523620e0044731c51bb012ff13edcf04e78f15cd 100755 (executable)
@@ -1525,9 +1525,9 @@ class TarFile(object):
 
            'x' or 'x:'  create a tarfile exclusively without compression, raise
                         an exception if the file is already created
-           'x:gz'       create an gzip compressed tarfile, raise an exception
+           'x:gz'       create a gzip compressed tarfile, raise an exception
                         if the file is already created
-           'x:bz2'      create an bzip2 compressed tarfile, raise an exception
+           'x:bz2'      create a bzip2 compressed tarfile, raise an exception
                         if the file is already created
            'x:xz'       create an lzma compressed tarfile, raise an exception
                         if the file is already created
index 135b5abf1013f864e8c708e10df15b4bed2141ce..77e72e570512029c8f807dd4f68fe9364c5d3276 100644 (file)
@@ -1182,7 +1182,7 @@ class SelectorSslTransportTests(test_utils.TestCase):
         self.assertIs(exc, waiter.exception())
 
     def test_cancel_handshake(self):
-        # Python issue #23197: cancelling an handshake must not raise an
+        # Python issue #23197: cancelling a handshake must not raise an
         # exception or log an error, even if the handshake failed
         waiter = asyncio.Future(loop=self.loop)
         transport = self.ssl_transport(waiter=waiter)
index a72967ea0714d245ab5a2fa3514164331e84dbc5..e4121a018440d6ab1df85b1290f310ea2d589dac 100644 (file)
@@ -40,7 +40,7 @@ class SslProtoHandshakeTests(test_utils.TestCase):
             ssl_proto.connection_made(transport)
 
     def test_cancel_handshake(self):
-        # Python issue #23197: cancelling an handshake must not raise an
+        # Python issue #23197: cancelling a handshake must not raise an
         # exception or log an error, even if the handshake failed
         waiter = asyncio.Future(loop=self.loop)
         ssl_proto = self.ssl_protocol(waiter)
index 823740c4449ffa38b4cc7e5030c9d94d9b802d59..e9dbddcd9305f1cc3999958e026f66da27774547 100644 (file)
@@ -58,7 +58,7 @@ class Rat(object):
     den = property(_get_den, None)
 
     def __repr__(self):
-        """Convert a Rat to an string resembling a Rat constructor call."""
+        """Convert a Rat to a string resembling a Rat constructor call."""
         return "Rat(%d, %d)" % (self.__num, self.__den)
 
     def __str__(self):
index 12969d518435a393a569eb382ed230ab918ea470..1562eecbd65811b307ae74ba8df4b507b8da86ff 100644 (file)
@@ -683,7 +683,7 @@ class FaultHandlerTests(unittest.TestCase):
             sys.stderr = stderr
 
     def test_stderr_None(self):
-        # Issue #21497: provide an helpful error if sys.stderr is None,
+        # Issue #21497: provide a helpful error if sys.stderr is None,
         # instead of just an attribute error: "None has no attribute fileno".
         with self.check_stderr_none():
             faulthandler.enable()
index 865d07688666f63b13e26d29231d258d5892f37a..247a6b323aef3450c1edc11386329d8848b2d29b 100644 (file)
@@ -200,7 +200,7 @@ class _BasePurePathTest(object):
 
     def _check_str_subclass(self, *args):
         # Issue #21127: it should be possible to construct a PurePath object
-        # from an str subclass instance, and it then gets converted to
+        # from a str subclass instance, and it then gets converted to
         # a pure str object.
         class StrSubclass(str):
             pass
index 2aa16fc1e60485dd32db24b126abdc8be93d9266..a5318795525e70ce7283a23f0661663cc6662dbd 100644 (file)
@@ -644,7 +644,7 @@ class SysModuleTest(unittest.TestCase):
         self.assertEqual(os.path.abspath(sys.executable), sys.executable)
 
         # Issue #7774: Ensure that sys.executable is an empty string if argv[0]
-        # has been set to an non existent program name and Python is unable to
+        # has been set to a non existent program name and Python is unable to
         # retrieve the real program name
 
         # For a normal installation, it should work without 'cwd'
index 06af5f2acba536fe456b871a64ba640e3e6add81..b49a9615f093d3cd9f191a59a11ae9c64db69c4a 100644 (file)
@@ -1082,7 +1082,7 @@ class EventTests(lock_tests.EventTests):
     eventtype = staticmethod(threading.Event)
 
 class ConditionAsRLockTests(lock_tests.RLockTests):
-    # An Condition uses an RLock by default and exports its API.
+    # Condition uses an RLock by default and exports its API.
     locktype = staticmethod(threading.Condition)
 
 class ConditionTests(lock_tests.ConditionTests):
index 845a2a8cfa90ee51db5a16f9039db10f506bb472..0c294ec0c446ea61b0e244144d023cf87fe74fa3 100644 (file)
@@ -22,7 +22,7 @@ class Gprof2htmlTests(unittest.TestCase):
         sys.argv = []
 
     def test_gprof(self):
-        # Issue #14508: this used to fail with an NameError.
+        # Issue #14508: this used to fail with a NameError.
         with mock.patch.object(self.gprof, 'webbrowser') as wmock, \
                 tempfile.TemporaryDirectory() as tmpdir:
             fn = os.path.join(tmpdir, 'abc')
index 97343802a51451b4aa4cff3509041276add954b6..d8d44375bdd222b57ad457b44ab367aa7e98f4c5 100644 (file)
@@ -195,7 +195,7 @@ class ZipAppTest(unittest.TestCase):
         self.assertTrue(new_target.getvalue().startswith(b'#!python2.7\n'))
 
     def test_read_from_pathobj(self):
-        # Test that we can copy an archive using an pathlib.Path object
+        # Test that we can copy an archive using a pathlib.Path object
         # for the source.
         source = self.tmpdir / 'source'
         source.mkdir()
index da430dfd77ebc7618e2b528dce61a733cce4302c..be6ed7585bedc415adfde1ef238f50a95c7e1b40 100644 (file)
@@ -2772,7 +2772,7 @@ class Menu(Widget):
                     self.deletecommand(c)
         self.tk.call(self._w, 'delete', index1, index2)
     def entrycget(self, index, option):
-        """Return the resource value of an menu item for OPTION at INDEX."""
+        """Return the resource value of a menu item for OPTION at INDEX."""
         return self.tk.call(self._w, 'entrycget', index, '-' + option)
     def entryconfigure(self, index, cnf=None, **kw):
         """Configure a menu item at INDEX."""
index 55f0776ce9ad6fba3879f427e23c11f72db3fffd..e0971a26adde51d2abf2ace33453a890e7b740e6 100644 (file)
@@ -3,7 +3,7 @@
 This is very preliminary.  I currently only support dnd *within* one
 application, between different windows (or within the same window).
 
-I an trying to make this as generic as possible -- not dependent on
+I am trying to make this as generic as possible -- not dependent on
 the use of a particular widget or icon type, etc.  I also hope that
 this will work with Pmw.
 
index c9dcf975f820f4362a1b029ccc2a40be1069819e..c68a650559e91edd5c5bdb44ce419e8bc0111b21 100644 (file)
@@ -193,7 +193,7 @@ class InternalFunctionsTest(unittest.TestCase):
 
         ## Testing type = vsapi
         # vsapi type expects at least a class name and a part_id, so this
-        # should raise an ValueError since it tries to get two elements from
+        # should raise a ValueError since it tries to get two elements from
         # an empty tuple
         self.assertRaises(ValueError, ttk._format_elemcreate, 'vsapi')
 
index c1cdfa7c0337c844e182dc191b96994c5ed8e847..adb629a7c86391e23cdf564dfcf0944b8254d229 100644 (file)
@@ -221,7 +221,7 @@ class Tk(tkinter.Tk, tixCommand):
         self.tk.eval('package require Tix')
 
     def destroy(self):
-        # For safety, remove an delete_window binding before destroy
+        # For safety, remove the delete_window binding before destroy
         self.protocol("WM_DELETE_WINDOW", "")
         tkinter.Tk.destroy(self)
 
@@ -702,7 +702,7 @@ class DirSelectBox(TixWidget):
 
 class ExFileSelectBox(TixWidget):
     """ExFileSelectBox - MS Windows style file select box.
-    It provides an convenient method for the user to select files.
+    It provides a convenient method for the user to select files.
 
     Subwidget       Class
     ---------       -----
@@ -760,7 +760,7 @@ class DirSelectDialog(TixWidget):
 # Should inherit from a Dialog class
 class ExFileSelectDialog(TixWidget):
     """ExFileSelectDialog - MS Windows style file select dialog.
-    It provides an convenient method for the user to select files.
+    It provides a convenient method for the user to select files.
 
     Subwidgets       Class
     ----------       -----
index 244fb3dd7439d442abca6084e6665e502ab4cdc2..7d868fb630313ac87f6d7e1f1c23da683c61c8b4 100644 (file)
@@ -1474,7 +1474,7 @@ class LabeledScale(Frame):
     can be accessed through instance.label"""
 
     def __init__(self, master=None, variable=None, from_=0, to=10, **kw):
-        """Construct an horizontal LabeledScale with parent master, a
+        """Construct a horizontal LabeledScale with parent master, a
         variable to be associated with the Ttk Scale widget and its range.
         If variable is not specified, a tkinter.IntVar is created.
 
index e7daa0793b7fbe5a9a655bbd40742fb8993738ac..551dce965267761c1ef9fde85827e60e6e4af0f9 100644 (file)
@@ -1446,7 +1446,7 @@ class ServerProxy:
         # magic method dispatcher
         return _Method(self.__request, name)
 
-    # note: to call a remote object with an non-standard name, use
+    # note: to call a remote object with a non-standard name, use
     # result getattr(server, "strange-python-name")(args)
 
     def __call__(self, attr):
index c8380bfeca5e1d4b809a2d1c7a9c19611b483ab6..eceb91de1aa455e4f20542ecaaf0aa0b88780ee0 100644 (file)
@@ -89,9 +89,10 @@ def create_archive(source, target=None, interpreter=None, main=None):
     The created application archive will have a shebang line specifying
     that it should run with INTERPRETER (there will be no shebang line if
     INTERPRETER is None), and a __main__.py which runs MAIN (if MAIN is
-    not specified, an existing __main__.py will be used). It is an to specify
-    MAIN for anything other than a directory source with no __main__.py, and it
-    is an error to omit MAIN if the directory has no __main__.py.
+    not specified, an existing __main__.py will be used).  It is an error
+    to specify MAIN for anything other than a directory source with no
+    __main__.py, and it is an error to omit MAIN if the directory has no
+    __main__.py.
     """
     # Are we copying an existing archive?
     source_is_file = False
index a8de7f917112b62634f9f8242d17480e9efb9b7d..7857f6f896c508a55ff0579fb48df2fa892e3a85 100644 (file)
@@ -7220,7 +7220,7 @@ Library
   cElementTree module is updated too.
 
 - Issue #7774: Set sys.executable to an empty string if argv[0] has been set to
-  an non existent program name and Python is unable to retrieve the real program
+  a non existent program name and Python is unable to retrieve the real program
   name.
 
 - Issue #7880: Fix sysconfig when the python executable is a symbolic link.
@@ -14013,7 +14013,7 @@ Core and builtins
   would not be removed while allocating a new weakref object.  Since
   GC could be invoked at that time, however, that assumption was
   invalid.  In a truly obscure case of GC being triggered during
-  creation for a new weakref object for an referent which already
+  creation for a new weakref object for a referent which already
   has a weakref without a callback which is only referenced from
   cyclic trash, a memory error can occur.  This consistently created a
   segfault in a debug build, but provided less predictable behavior in
@@ -18737,7 +18737,7 @@ Standard library
 
 - xml.dom.minidom offers a toprettyxml method. A number of DOM
   conformance issues have been resolved. In particular, Element now
-  has an hasAttributes method, and the handling of namespaces was
+  has a hasAttributes method, and the handling of namespaces was
   improved.
 
 - Ka-Ping Yee contributed two new modules: inspect.py, a module for
@@ -20227,7 +20227,7 @@ list of all new modules is included below.
 
 Probably the most pervasive change is the addition of Unicode support.
 We've added a new fundamental datatype, the Unicode string, a new
-build-in function unicode(), an numerous C APIs to deal with Unicode
+built-in function unicode(), and numerous C APIs to deal with Unicode
 and encodings.  See the file Misc/unicode.txt for details, or
 http://starship.python.net/crew/lemburg/unicode-proposal.txt.
 
@@ -21712,7 +21712,7 @@ real list objects.
 - The uu module now deals better with trailing garbage generated by
 some broke uuencoders.
 
-- The telnet module now has an my_interact() method which uses threads
+- The telnet module now has a my_interact() method which uses threads
 instead of select.  The interact() method uses this by default on
 Windows (where the single-threaded version doesn't work).
 
@@ -22769,7 +22769,7 @@ PyEval_CallMethod().
 - New macros to access object members for PyFunction, PyCFunction
 objects.
 
-- New APIs PyImport_AppendInittab() an PyImport_ExtendInittab() to
+- New APIs PyImport_AppendInittab() and PyImport_ExtendInittab() to
 dynamically add one or many entries to the table of built-in modules.
 
 - New macro Py_InitModule3(name, methods, doc) which calls
@@ -27179,7 +27179,7 @@ a string it is returned unchanged, otherwise it returns `x`.
 * repr(x) returns the same as `x`.  (Some users found it easier to
 have this as a function.)
 
-* round(x) returns the floating point number x rounded to an whole
+* round(x) returns the floating point number x rounded to a whole
 number, represented as a floating point number.  round(x, n) returns x
 rounded to n digits.
 
index 94d8255eabd7fe25b53a0fcb693d410a2578034d..7b6b4187cbba4acfcbc8ae57ca40cee97720447a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1169,7 +1169,7 @@ Core and Builtins
 - Issue #24407: Fix crash when dict is mutated while being updated.
 
 - Issue #24619: New approach for tokenizing async/await. As a consequence,
-  is is now possible to have one-line 'async def foo(): await ..' functions.
+  it is now possible to have one-line 'async def foo(): await ..' functions.
 
 - Issue #24687: Plug refleak on SyntaxError in function parameters
   annotations.
@@ -3515,7 +3515,7 @@ Library
 - Issue #21000: Improve the command-line interface of json.tool.
 
 - Issue #20995: Enhance default ciphers used by the ssl module to enable
-  better security an prioritize perfect forward secrecy.
+  better security and prioritize perfect forward secrecy.
 
 - Issue #20884: Don't assume that __file__ is defined on importlib.__init__.
 
index d6f2ca85adf717155aa8f833b1076eb1edee74d1..101f449d066b3a3d80e51ba1ea2ea885b11ad577 100644 (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 " */
index 7e20301ec1b649e58c5861320949b9699a6876bd..94261288107b6236a0d8ffcfc02ccf1242e392fa 100644 (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");
index 78cfe2038409a3aa8f7dded37f3f2fcd58fcb111..47977ec50d3217811c33de724cf8f5ef52f3d060 100644 (file)
@@ -4629,7 +4629,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
index 60c1b063ac850f7f32371a7d82ecfd3d47d9f7c7..796ac0fa33914c404b20b1b37d08c1456cc0d1e8 100644 (file)
@@ -519,7 +519,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
index 9485e24c1f7508058db1abb77261cf8238c22de8..f1fda481fc61bf6548448985c6d57943adb0c654 100644 (file)
@@ -1051,7 +1051,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",
index 781fbcdf1a5f6191c8110f05a5ef3b0eb33a2646..409922a64388287f21cc8872481e909669cc9439 100644 (file)
@@ -4483,7 +4483,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\
index c723a9c9764cbd39d37bbfb9749170e7b3dea5c7..5a0480cc8f786ee49ae18b909017d41fc1da6e2e 100644 (file)
@@ -3091,7 +3091,7 @@ bytearray(bytes_or_buffer) -> mutable copy of bytes_or_buffer\n\
 bytearray(int) -> bytes array of size given by the parameter initialized with null bytes\n\
 bytearray() -> empty bytes array\n\
 \n\
-Construct an mutable bytearray object from:\n\
+Construct a mutable bytearray object from:\n\
   - an iterable yielding integers in range(256)\n\
   - a text string encoded using the specified encoding\n\
   - a bytes or a buffer object\n\
index 2be32e01b832398358fcf7d13eeb8394420bd320..0e9eb20154b7a0cf8d961263c6e02888d54a7632 100644 (file)
@@ -5,7 +5,7 @@
 
 /* Support objects whose length is > PY_SSIZE_T_MAX.
 
-   This could be sped up for small PyLongs if they fit in an Py_ssize_t.
+   This could be sped up for small PyLongs if they fit in a Py_ssize_t.
    This only matters on Win64.  Though we could use PY_LONG_LONG which
    would presumably help perf.
 */
index aec221acff9d43dee1d0f99b2ff39fd38c49c83c..be09b5f6fa78b61e08f52ff028d9929da35b0550 100644 (file)
@@ -1226,7 +1226,7 @@ static PyTypeObject PyFieldNameIter_Type = {
     0};
 
 /* unicode_formatter_field_name_split is used to implement
-   string.Formatter.vformat.  it takes an PEP 3101 "field name", and
+   string.Formatter.vformat.  it takes a PEP 3101 "field name", and
    returns a tuple of (first, rest): "first", the part before the
    first '.' or '['; and "rest", an iterator for the rest of the field
    name.  it's a wrapper around stringlib/string_format.h's
index 22b332fbf2a76ef98ed1dedfa4142a7e8bb8b774..338e33d39ab9c33d84cfd399740e6fa257ffe16b 100644 (file)
@@ -120,7 +120,7 @@ PyDoc_STRVAR(winreg_ConnectRegistry__doc__,
 "ConnectRegistry($module, computer_name, key, /)\n"
 "--\n"
 "\n"
-"Establishes a connection to the registry on on another computer.\n"
+"Establishes a connection to the registry on another computer.\n"
 "\n"
 "  computer_name\n"
 "    The name of the remote computer, of the form r\"\\\\computername\".  If\n"
@@ -913,7 +913,7 @@ PyDoc_STRVAR(winreg_SetValueEx__doc__,
 "                     references to environment variables (for example,\n"
 "                     %PATH%).\n"
 "    REG_LINK -- A Unicode symbolic link.\n"
-"    REG_MULTI_SZ -- An sequence of null-terminated strings, terminated\n"
+"    REG_MULTI_SZ -- A sequence of null-terminated strings, terminated\n"
 "                    by two null characters.  Note that Python handles\n"
 "                    this termination automatically.\n"
 "    REG_NONE -- No defined value type.\n"
@@ -1056,4 +1056,4 @@ winreg_QueryReflectionKey(PyModuleDef *module, PyObject *arg)
 exit:
     return return_value;
 }
-/*[clinic end generated code: output=71f5bc30b646807b input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5e346dccc296f9f1 input=a9049054013a1b77]*/
index 3313202bc43c83d5b4683f67b2fe5a21edae26a8..d1c3f39525b5c24723e8a1f18067b9eb6fdc5535 100644 (file)
@@ -792,7 +792,7 @@ winreg.ConnectRegistry -> HKEY
         The predefined key to connect to.
     /
 
-Establishes a connection to the registry on on another computer.
+Establishes a connection to the registry on another computer.
 
 The return value is the handle of the opened key.
 If the function fails, an OSError exception is raised.
@@ -801,7 +801,7 @@ If the function fails, an OSError exception is raised.
 static HKEY
 winreg_ConnectRegistry_impl(PyModuleDef *module, Py_UNICODE *computer_name,
                             HKEY key)
-/*[clinic end generated code: output=5c52f6f7ba6e7b46 input=9a056558ce318433]*/
+/*[clinic end generated code: output=5c52f6f7ba6e7b46 input=5f98a891a347e68e]*/
 {
     HKEY retKey;
     long rc;
@@ -1605,7 +1605,7 @@ winreg.SetValueEx
                          references to environment variables (for example,
                          %PATH%).
         REG_LINK -- A Unicode symbolic link.
-        REG_MULTI_SZ -- An sequence of null-terminated strings, terminated
+        REG_MULTI_SZ -- A sequence of null-terminated strings, terminated
                         by two null characters.  Note that Python handles
                         this termination automatically.
         REG_NONE -- No defined value type.
@@ -1631,7 +1631,7 @@ the configuration registry to help the registry perform efficiently.
 static PyObject *
 winreg_SetValueEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *value_name,
                        PyObject *reserved, DWORD type, PyObject *value)
-/*[clinic end generated code: output=ea092a935c361582 input=e73dec535ebeea7d]*/
+/*[clinic end generated code: output=ea092a935c361582 input=f1b16cbcc3ed4101]*/
 {
     BYTE *data;
     DWORD len;
index 84452cdac4eccb410c1f1b9658ae154ae525af2d..b29b1b6e3ff6d7f60678022c754227f115c3ed4b 100644 (file)
@@ -231,7 +231,7 @@ PyThread_start_new_thread(void (*func)(void *), void *arg)
 }
 
 /*
- * Return the thread Id instead of an handle. The Id is said to uniquely identify the
+ * Return the thread Id instead of a handle. The Id is said to uniquely identify the
  * thread in the system
  */
 long