Skip to content

Commit 82f34ad

Browse files
committed
fix instances of consecutive articles (closes python#23221)
Patch by Karan Goel.
1 parent 38dc250 commit 82f34ad

14 files changed

Lines changed: 14 additions & 13 deletions

File tree

Doc/c-api/exceptions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ in various ways. There is a separate error indicator for each thread.
6464
Do not compare the return value to a specific exception; use
6565
:c:func:`PyErr_ExceptionMatches` instead, shown below. (The comparison could
6666
easily fail since the exception may be an instance instead of a class, in the
67-
case of a class exception, or it may the a subclass of the expected exception.)
67+
case of a class exception, or it may be a subclass of the expected exception.)
6868
6969
7070
.. c:function:: int PyErr_ExceptionMatches(PyObject *exc)

Doc/c-api/init.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ These functions are only intended to be used by advanced debugging tools.
11821182
11831183
.. c:function:: PyThreadState * PyInterpreterState_ThreadHead(PyInterpreterState *interp)
11841184
1185-
Return the a pointer to the first :c:type:`PyThreadState` object in the list of
1185+
Return the pointer to the first :c:type:`PyThreadState` object in the list of
11861186
threads associated with the interpreter *interp*.
11871187
11881188

Doc/c-api/structures.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ The :attr:`ml_meth` is a C function pointer. The functions may be of different
131131
types, but they always return :c:type:`PyObject\*`. If the function is not of
132132
the :c:type:`PyCFunction`, the compiler will require a cast in the method table.
133133
Even though :c:type:`PyCFunction` defines the first parameter as
134-
:c:type:`PyObject\*`, it is common that the method implementation uses a the
134+
:c:type:`PyObject\*`, it is common that the method implementation uses the
135135
specific C type of the *self* object.
136136

137137
The :attr:`ml_flags` field is a bitfield which can include the following flags.

Doc/distutils/apiref.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ directories.
964964
.. function:: create_tree(base_dir, files[, mode=0o777, verbose=0, dry_run=0])
965965

966966
Create all the empty directories under *base_dir* needed to put *files* there.
967-
*base_dir* is just the a name of a directory which doesn't necessarily exist
967+
*base_dir* is just the name of a directory which doesn't necessarily exist
968968
yet; *files* is a list of filenames to be interpreted relative to *base_dir*.
969969
*base_dir* + the directory portion of every file in *files* will be created if
970970
it doesn't already exist. *mode*, *verbose* and *dry_run* flags are as for

Doc/library/unittest.mock.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1499,7 +1499,7 @@ where we have imported it. The patching should look like::
14991499
However, consider the alternative scenario where instead of ``from a import
15001500
SomeClass`` module b does ``import a`` and ``some_function`` uses ``a.SomeClass``. Both
15011501
of these import forms are common. In this case the class we want to patch is
1502-
being looked up on the a module and so we have to patch ``a.SomeClass`` instead::
1502+
being looked up in the module and so we have to patch ``a.SomeClass`` instead::
15031503

15041504
@patch('a.SomeClass')
15051505

Include/dynamic_annotations.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150

151151
/* Report that a new memory at "address" of size "size" has been allocated.
152152
This might be used when the memory has been retrieved from a free list and
153-
is about to be reused, or when a the locking discipline for a variable
153+
is about to be reused, or when the locking discipline for a variable
154154
changes. */
155155
#define _Py_ANNOTATE_NEW_MEMORY(address, size) \
156156
AnnotateNewMemory(__FILE__, __LINE__, address, size)

Include/unicodeobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ PyAPI_FUNC(PyObject*) PyUnicode_New(
605605
);
606606
#endif
607607

608-
/* Initializes the canonical string representation from a the deprecated
608+
/* Initializes the canonical string representation from the deprecated
609609
wstr/Py_UNICODE representation. This function is used to convert Unicode
610610
objects which were created using the old API to the new flexible format
611611
introduced with PEP 393.

Lib/distutils/dir_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def create_tree(base_dir, files, mode=0o777, verbose=1, dry_run=0):
8181
"""Create all the empty directories under 'base_dir' needed to put 'files'
8282
there.
8383
84-
'base_dir' is just the a name of a directory which doesn't necessarily
84+
'base_dir' is just the name of a directory which doesn't necessarily
8585
exist yet; 'files' is a list of filenames to be interpreted relative to
8686
'base_dir'. 'base_dir' + the directory portion of every file in 'files'
8787
will be created if it doesn't already exist. 'mode', 'verbose' and

Lib/http/cookiejar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1792,7 +1792,7 @@ def revert(self, filename=None,
17921792

17931793

17941794
def lwp_cookie_str(cookie):
1795-
"""Return string representation of Cookie in an the LWP cookie file format.
1795+
"""Return string representation of Cookie in the LWP cookie file format.
17961796
17971797
Actually, the format is extended a bit -- see module docstring.
17981798

Lib/lib2to3/fixes/fix_exitfunc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def start_tree(self, tree, filename):
3535
self.sys_import = None
3636

3737
def transform(self, node, results):
38-
# First, find a the sys import. We'll just hope it's global scope.
38+
# First, find the sys import. We'll just hope it's global scope.
3939
if "sys_import" in results:
4040
if self.sys_import is None:
4141
self.sys_import = results["sys_import"]

0 commit comments

Comments
 (0)