]> granicus.if.org Git - python/commitdiff
fix instances of consecutive articles (closes #23221)
authorBenjamin Peterson <benjamin@python.org>
Tue, 13 Jan 2015 14:17:24 +0000 (09:17 -0500)
committerBenjamin Peterson <benjamin@python.org>
Tue, 13 Jan 2015 14:17:24 +0000 (09:17 -0500)
Patch by Karan Goel.

14 files changed:
Doc/c-api/exceptions.rst
Doc/c-api/init.rst
Doc/c-api/structures.rst
Doc/distutils/apiref.rst
Doc/library/unittest.mock.rst
Include/dynamic_annotations.h
Include/unicodeobject.h
Lib/distutils/dir_util.py
Lib/http/cookiejar.py
Lib/lib2to3/fixes/fix_exitfunc.py
Lib/socket.py
Lib/test/test_argparse.py
Misc/ACKS
Modules/_ctypes/_ctypes.c

index 8ad742afefa6168df9ae9fa01836e64ba7045559..66b7752661d2e69a5af719231d6036e45d976157 100644 (file)
@@ -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)
index eb542de4d8b01fc4a6fb6c00da4d7805bff093de..4d358ca757d7f8ec4c0ba1023f56d880eb5e909a 100644 (file)
@@ -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 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*.
 
 
index bb741fb099ea8baadc31a4bdc41fb993e8f44952..66a3443b2d40994dcdfd92879aaa97407e816976 100644 (file)
@@ -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 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.
index fff06416b2c5a1a92f6533f3b991f6fab32937bb..82bed24983639c3fe337f2f1a7bc79de39d44b73 100644 (file)
@@ -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 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
index b242438cf48151aeaae38ebe04d403774108ef34..845e0c41e63d9a784e3b60cb92426160c47ce7a6 100644 (file)
@@ -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')
 
index d63c5db08576480f1f5fe07c796c68d3746e0194..0bd1a833c2e5a54ef951321abe83f5d693d5d39c 100644 (file)
 
   /* 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 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)
index 057b195218b31854a6449f8b82aa796e6255afb5..729f5848163ae5697aa6bdf9fba18ec475c3981d 100644 (file)
@@ -605,7 +605,7 @@ PyAPI_FUNC(PyObject*) PyUnicode_New(
     );
 #endif
 
-/* Initializes the canonical string representation from 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.
index 0924c9b0f75bf35ba4c359d709446432a6368f8d..d5cd8e3e24f46a8d4610717d76fb3ef9ad80b643 100644 (file)
@@ -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 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
index 2ddd523bbaffada7aaff6ab38e2dfb367565ecf5..7e4982f3e4d0f5aff2caed7719c9ff550a6dc986 100644 (file)
@@ -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.
 
index 9afc2fac18a36fde6848da9d29d62c20c3d312c2..2e47887afead368518e7930397410335887d60f9 100644 (file)
@@ -35,7 +35,7 @@ class FixExitfunc(fixer_base.BaseFix):
         self.sys_import = None
 
     def transform(self, node, results):
-        # First, find 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"]
index 22d7ad567bebe6ecc2e39f4acce6cc69b6d108d6..8efd760696686881c94bf0edcce6faf35b77c61a 100644 (file)
@@ -299,7 +299,7 @@ if hasattr(_socket.socket, "share"):
     def fromshare(info):
         """ fromshare(info) -> socket object
 
-        Create a socket object from the bytes object returned by
+        Create a socket object from the bytes object returned by
         socket.share(pid).
         """
         return socket(0, 0, 0, info)
index 98ccfe448434f50331f23c74f18a90a32480779f..1164f3feb94e49cde40db57eceff3864f4e77ea2 100644 (file)
@@ -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),
index d4ec6592938951db4c5c4d30b31a5664ace0d4f6..6c810a96f52dde5930b80d1e08fa0caf431439ff 100644 (file)
--- 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
index fd00e5338cf1c183b9d2a73675d2bc371f0a6e0c..f771473aa8ea38218462cd9219f7f120eac46cf2 100644 (file)
@@ -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 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.
     */