]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Fix typos in docs and comments (#109619) (#109621)
authorAlex Waygood <Alex.Waygood@Gmail.com>
Mon, 2 Oct 2023 17:34:49 +0000 (18:34 +0100)
committerGitHub <noreply@github.com>
Mon, 2 Oct 2023 17:34:49 +0000 (17:34 +0000)
Fix typos in docs and comments (#109619)

Co-authored-by: Heinz-Alexander Fuetterer <35225576+afuetterer@users.noreply.github.com>
Doc/c-api/exceptions.rst
Doc/library/typing.rst
Doc/whatsnew/3.12.rst
Doc/whatsnew/3.5.rst
Lib/test/test_descr.py
Lib/test/test_dynamic.py
Lib/test/test_frame.py
Lib/test/test_unpack.py
Objects/object_layout.md

index 6e2ac0a40a5f1bba00ed9ab0bed8876515e51f85..2139da051e0193199f2ca4d72db29f25ff8286a9 100644 (file)
@@ -786,7 +786,7 @@ Exception Objects
 
    Implement part of the interpreter's implementation of :keyword:`!except*`.
    *orig* is the original exception that was caught, and *excs* is the list of
-   the exceptions that need to be raised. This list contains the the unhandled
+   the exceptions that need to be raised. This list contains the unhandled
    part of *orig*, if any, as well as the exceptions that were raised from the
    :keyword:`!except*` clauses (so they have a different traceback from *orig*) and
    those that were reraised (and have the same traceback as *orig*).
index f36dc76c3232f7c038e3c63d5568123e2cb16fd7..eb14d11604ae1d1c6ccc15ea9a4e546194556878 100644 (file)
@@ -1291,7 +1291,7 @@ These can be used as types in annotations. They all support subscription using
    completely disables typechecking for a function or class.
 
    The responsibility of how to interpret the metadata
-   lies with the the tool or library encountering an
+   lies with the tool or library encountering an
    ``Annotated`` annotation. A tool or library encountering an ``Annotated`` type
    can scan through the metadata elements to determine if they are of interest
    (e.g., using :func:`isinstance`).
index f63664d1239b624bff8edb774e12cc0559bedfab..f9cc94514f2cad28ea649a5123b4bf47d79e8fb4 100644 (file)
@@ -354,7 +354,7 @@ create an interpreter with its own GIL::
    if (PyStatus_Exception(status)) {
        return -1;
    }
-   /* The new interpeter is now active in the current thread. */
+   /* The new interpreter is now active in the current thread. */
 
 For further examples how to use the C-API for sub-interpreters with a
 per-interpreter GIL, see :source:`Modules/_xxsubinterpretersmodule.c`.
index 3c0d8d665c3949b83cdb839627057d4a64f8cdc6..108e5293bc4b1c92add731d01ca1aa57337f0b8f 100644 (file)
@@ -921,7 +921,7 @@ and improves their substitutability for lists.
 Docstrings produced by :func:`~collections.namedtuple` can now be updated::
 
     Point = namedtuple('Point', ['x', 'y'])
-    Point.__doc__ += ': Cartesian coodinate'
+    Point.__doc__ += ': Cartesian coordinate'
     Point.x.__doc__ = 'abscissa'
     Point.y.__doc__ = 'ordinate'
 
index 9d8b1497330f0a6d840c59a0f9584f2145187fb1..bf4b8f9572df4ce2a0c883f8ac79cbcc8aff1f5f 100644 (file)
@@ -1989,7 +1989,7 @@ order (MRO) for bases """
         ns = {}
         exec(code, ns)
         number_attrs = ns["number_attrs"]
-        # Warm up the the function for quickening (PEP 659)
+        # Warm up the function for quickening (PEP 659)
         for _ in range(30):
             self.assertEqual(number_attrs(Numbers()), list(range(280)))
 
index 7e12d428e0fde2f4001f9a7ae87257bf8a0fee15..0aa3be6a1bde6ae6b050ee1daccb49d8bd663897 100644 (file)
@@ -145,7 +145,7 @@ class RebindBuiltinsTests(unittest.TestCase):
         code = "lambda: " + "+".join(f"_number_{i}" for i in range(variables))
         sum_func = eval(code, MyGlobals())
         expected = sum(range(variables))
-        # Warm up the the function for quickening (PEP 659)
+        # Warm up the function for quickening (PEP 659)
         for _ in range(30):
             self.assertEqual(sum_func(), expected)
 
index 6bb0144e9b1ed75f0f745da1875da3f65872e954..9491c7facdf077bdcb02189390d66193c37d5191 100644 (file)
@@ -322,7 +322,7 @@ class TestIncompleteFrameAreInvisible(unittest.TestCase):
             sneaky_frame_object = None
             gc.enable()
             next(g)
-            # g.gi_frame should be the the frame object from the callback (the
+            # g.gi_frame should be the frame object from the callback (the
             # one that was *requested* second, but *created* first):
             self.assertIs(g.gi_frame, sneaky_frame_object)
         finally:
index f5ca1d455b5c6f2db608d01848a1a4050fc14eb0..515ec128a08a9cfd69cdc3486160fadd69b9811d 100644 (file)
@@ -162,7 +162,7 @@ class TestCornerCases(unittest.TestCase):
         ns = {}
         exec(code, ns)
         unpack_400 = ns["unpack_400"]
-        # Warm up the the function for quickening (PEP 659)
+        # Warm up the function for quickening (PEP 659)
         for _ in range(30):
             y = unpack_400(range(400))
             self.assertEqual(y, 399)
index 9380b57938c8e3189f7d6bb7687fe20bb6cdf0b7..82483022a01442fce160995c678f64a0c9a86242 100644 (file)
@@ -36,7 +36,7 @@ and the ``dict`` field points to the dictionary.
 
 ## 3.12 pre-header
 
-In 3.12 the the pointer to the list of weak references is added to the
+In 3.12 the pointer to the list of weak references is added to the
 pre-header. In order to make space for it, the ``dict`` and ``values``
 pointers are combined into a single tagged pointer: