diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst index 8ad742afefa..66b7752661d 100644 --- a/Doc/c-api/exceptions.rst +++ b/Doc/c-api/exceptions.rst @@ -64,7 +64,7 @@ in various ways. There is a separate error indicator for each thread. Do not compare the return value to a specific exception; use :c:func:`PyErr_ExceptionMatches` instead, shown below. (The comparison could easily fail since the exception may be an instance instead of a class, in the - case of a class exception, or it may the a subclass of the expected exception.) + case of a class exception, or it may be a subclass of the expected exception.) .. c:function:: int PyErr_ExceptionMatches(PyObject *exc) diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index eb542de4d8b..4d358ca757d 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -1182,7 +1182,7 @@ These functions are only intended to be used by advanced debugging tools. .. c:function:: PyThreadState * PyInterpreterState_ThreadHead(PyInterpreterState *interp) - Return the a pointer to the first :c:type:`PyThreadState` object in the list of + Return the pointer to the first :c:type:`PyThreadState` object in the list of threads associated with the interpreter *interp*. diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst index bb741fb099e..66a3443b2d4 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -131,7 +131,7 @@ The :attr:`ml_meth` is a C function pointer. The functions may be of different types, but they always return :c:type:`PyObject\*`. If the function is not of the :c:type:`PyCFunction`, the compiler will require a cast in the method table. Even though :c:type:`PyCFunction` defines the first parameter as -:c:type:`PyObject\*`, it is common that the method implementation uses a the +:c:type:`PyObject\*`, it is common that the method implementation uses the specific C type of the *self* object. The :attr:`ml_flags` field is a bitfield which can include the following flags. diff --git a/Doc/distutils/apiref.rst b/Doc/distutils/apiref.rst index fff06416b2c..82bed249836 100644 --- a/Doc/distutils/apiref.rst +++ b/Doc/distutils/apiref.rst @@ -964,7 +964,7 @@ directories. .. function:: create_tree(base_dir, files[, mode=0o777, verbose=0, dry_run=0]) Create all the empty directories under *base_dir* needed to put *files* there. - *base_dir* is just the a name of a directory which doesn't necessarily exist + *base_dir* is just the name of a directory which doesn't necessarily exist yet; *files* is a list of filenames to be interpreted relative to *base_dir*. *base_dir* + the directory portion of every file in *files* will be created if it doesn't already exist. *mode*, *verbose* and *dry_run* flags are as for diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst index b242438cf48..845e0c41e63 100644 --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@ -1499,7 +1499,7 @@ where we have imported it. The patching should look like:: However, consider the alternative scenario where instead of ``from a import SomeClass`` module b does ``import a`` and ``some_function`` uses ``a.SomeClass``. Both of these import forms are common. In this case the class we want to patch is -being looked up on the a module and so we have to patch ``a.SomeClass`` instead:: +being looked up in the module and so we have to patch ``a.SomeClass`` instead:: @patch('a.SomeClass') diff --git a/Include/dynamic_annotations.h b/Include/dynamic_annotations.h index d63c5db0857..0bd1a833c2e 100644 --- a/Include/dynamic_annotations.h +++ b/Include/dynamic_annotations.h @@ -150,7 +150,7 @@ /* Report that a new memory at "address" of size "size" has been allocated. This might be used when the memory has been retrieved from a free list and - is about to be reused, or when a the locking discipline for a variable + is about to be reused, or when the locking discipline for a variable changes. */ #define _Py_ANNOTATE_NEW_MEMORY(address, size) \ AnnotateNewMemory(__FILE__, __LINE__, address, size) diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index 057b195218b..729f5848163 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -605,7 +605,7 @@ PyAPI_FUNC(PyObject*) PyUnicode_New( ); #endif -/* Initializes the canonical string representation from a the deprecated +/* Initializes the canonical string representation from the deprecated wstr/Py_UNICODE representation. This function is used to convert Unicode objects which were created using the old API to the new flexible format introduced with PEP 393. diff --git a/Lib/distutils/dir_util.py b/Lib/distutils/dir_util.py index 0924c9b0f75..d5cd8e3e24f 100644 --- a/Lib/distutils/dir_util.py +++ b/Lib/distutils/dir_util.py @@ -81,7 +81,7 @@ def create_tree(base_dir, files, mode=0o777, verbose=1, dry_run=0): """Create all the empty directories under 'base_dir' needed to put 'files' there. - 'base_dir' is just the a name of a directory which doesn't necessarily + 'base_dir' is just the name of a directory which doesn't necessarily exist yet; 'files' is a list of filenames to be interpreted relative to 'base_dir'. 'base_dir' + the directory portion of every file in 'files' will be created if it doesn't already exist. 'mode', 'verbose' and diff --git a/Lib/http/cookiejar.py b/Lib/http/cookiejar.py index 2ddd523bbaf..7e4982f3e4d 100644 --- a/Lib/http/cookiejar.py +++ b/Lib/http/cookiejar.py @@ -1792,7 +1792,7 @@ class FileCookieJar(CookieJar): def lwp_cookie_str(cookie): - """Return string representation of Cookie in an the LWP cookie file format. + """Return string representation of Cookie in the LWP cookie file format. Actually, the format is extended a bit -- see module docstring. diff --git a/Lib/lib2to3/fixes/fix_exitfunc.py b/Lib/lib2to3/fixes/fix_exitfunc.py index 9afc2fac18a..2e47887afea 100644 --- a/Lib/lib2to3/fixes/fix_exitfunc.py +++ b/Lib/lib2to3/fixes/fix_exitfunc.py @@ -35,7 +35,7 @@ class FixExitfunc(fixer_base.BaseFix): self.sys_import = None def transform(self, node, results): - # First, find a the sys import. We'll just hope it's global scope. + # First, find the sys import. We'll just hope it's global scope. if "sys_import" in results: if self.sys_import is None: self.sys_import = results["sys_import"] diff --git a/Lib/socket.py b/Lib/socket.py index 22d7ad567be..8efd7606966 100644 --- a/Lib/socket.py +++ b/Lib/socket.py @@ -299,7 +299,7 @@ if hasattr(_socket.socket, "share"): def fromshare(info): """ fromshare(info) -> socket object - Create a socket object from a the bytes object returned by + Create a socket object from the bytes object returned by socket.share(pid). """ return socket(0, 0, 0, info) diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py index 98ccfe44843..1164f3feb94 100644 --- a/Lib/test/test_argparse.py +++ b/Lib/test/test_argparse.py @@ -644,7 +644,7 @@ class TestOptionalsChoices(ParserTestCase): class TestOptionalsRequired(ParserTestCase): - """Tests the an optional action that is required""" + """Tests an optional action that is required""" argument_signatures = [ Sig('-x', type=int, required=True), diff --git a/Misc/ACKS b/Misc/ACKS index d4ec6592938..6c810a96f52 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -483,6 +483,7 @@ Yannick Gingras Matt Giuca Wim Glenn Michael Goderbauer +Karan Goel Jeroen Van Goey Christoph Gohlke Tim Golden diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index fd00e5338cf..f771473aa8e 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -4830,7 +4830,7 @@ Pointer_set_contents(CDataObject *self, PyObject *value, void *closure) *(void **)self->b_ptr = dst->b_ptr; /* - A Pointer instance must keep a the value it points to alive. So, a + A Pointer instance must keep the value it points to alive. So, a pointer instance has b_length set to 2 instead of 1, and we set 'value' itself as the second item of the b_objects list, additionally. */