]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix typos in docs and comments (#109619)
authorHeinz-Alexander Fuetterer <35225576+afuetterer@users.noreply.github.com>
Wed, 20 Sep 2023 16:58:23 +0000 (18:58 +0200)
committerGitHub <noreply@github.com>
Wed, 20 Sep 2023 16:58:23 +0000 (16:58 +0000)
14 files changed:
Doc/c-api/exceptions.rst
Doc/library/typing.rst
Doc/library/unittest.mock.rst
Doc/whatsnew/3.12.rst
Doc/whatsnew/3.13.rst
Doc/whatsnew/3.5.rst
Lib/concurrent/futures/process.py
Lib/test/test_descr.py
Lib/test/test_dynamic.py
Lib/test/test_frame.py
Lib/test/test_unpack.py
Misc/NEWS.d/next/C API/2023-08-24-20-08-02.gh-issue-108014.20DOSS.rst
Objects/object_layout.md
Tools/cases_generator/generate_cases.py

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 18e15f304f9f80ee23423d849ce8df4e82468f73..e63b839931822c8b3872144a0804aaec3bea759d 100644 (file)
@@ -1301,7 +1301,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 1452276436099b2438f838932c987f3c58b9c2b3..49f7d453ee1c3a1c4e29d81e45bdcb5672d53677 100644 (file)
@@ -1130,7 +1130,7 @@ object::
 
   .. method:: wait_until_any_call_with(*args, **kwargs)
 
-      Waits until the the mock is called with the specified arguments.
+      Waits until the mock is called with the specified arguments.
 
       If a timeout was passed at the creation of the mock
       the function raises an :exc:`AssertionError` if the call is not performed in time.
index 4d4d1a69e0b44c0fe434100bcb7df2db2e5bb1f4..6b4ec99b43dea61ebf136a12b23af7146847883a 100644 (file)
@@ -308,7 +308,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 fa24dc072ddefd7b7d9581334d7c97b53ae1a6a7..b4411a587c8bc7b240a49774bf497c5aaec6722a 100644 (file)
@@ -119,7 +119,7 @@ copy
 ----
 
 * Add :func:`copy.replace` function which allows to create a modified copy of
-  an object, which is especially usefule for immutable objects.
+  an object, which is especially useful for immutable objects.
   It supports named tuples created with the factory function
   :func:`collections.namedtuple`, :class:`~dataclasses.dataclass` instances,
   various :mod:`datetime` objects, :class:`~inspect.Signature` objects,
@@ -208,7 +208,7 @@ tkinter
 traceback
 ---------
 
-* Add *show_group* paramter to :func:`traceback.TracebackException.format_exception_only`
+* Add *show_group* parameter to :func:`traceback.TracebackException.format_exception_only`
   to format the nested exceptions of a :exc:`BaseExceptionGroup` instance, recursively.
   (Contributed by Irit Katriel in :gh:`105292`.)
 
index 0c45a42d1a7c17865f42e9c5a522da56a38be34c..ae6affcab664c608ebaed4f65acc6f00c4936849 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 f4b5cd1d869067dd5cafbef7c32d415790204fe2..fba19d39d5c9c2c93533f80a6ab38292d266bfd5 100644 (file)
@@ -495,7 +495,7 @@ class _ExecutorManagerThread(threading.Thread):
                 # set_exception() fails if the future is cancelled: ignore it.
                 # Trying to check if the future is cancelled before calling
                 # set_exception() would leave a race condition if the future is
-                # cancelled betwen the check and set_exception().
+                # cancelled between the check and set_exception().
                 pass
             # Delete references to object. See issue16284
             del work_item
index 35ddb7915eb5c756034a247b68edd0e89589cdb4..4a3db80ca43c2733c6f3a11a0284695b45d7b931 100644 (file)
@@ -1989,7 +1989,7 @@ class ClassPropertiesAndMethods(unittest.TestCase):
         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 5c1b04f3237e7880f10812b8945b26ef924111fb..35cb153ba090765b51e0b328bb6c7d15d1daafaf 100644 (file)
@@ -1,4 +1,4 @@
 Add :c:func:`PyLong_AsInt` function: similar to :c:func:`PyLong_AsLong`, but
 store the result in a C :c:expr:`int` instead of a C :c:expr:`long`.
-Previously, it was known as the the private function :c:func:`!_PyLong_AsInt`
+Previously, it was known as the private function :c:func:`!_PyLong_AsInt`
 (with an underscore prefix). Patch by Victor Stinner.
index 4430790f4f0f36a96fe534e24e197cdc11be9841..3f7d72eb22f22410bfb2ee31afd8dde8e5a964f4 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:
 
index 5ddcd6ef7bf2740005dd78f78f76ef4f2bb2cbc3..898736248a98f9c8f7c59d19533a51bc3746f1a2 100644 (file)
@@ -168,7 +168,7 @@ class Generator(Analyzer):
                 popped, pushed = stacking.get_stack_effect_info_for_macro(instr)
             case parsing.Pseudo():
                 instr = self.pseudo_instrs[thing.name]
-                # Calculate stack effect, and check that it's the the same
+                # Calculate stack effect, and check that it's the same
                 # for all targets.
                 for target in self.pseudos[thing.name].targets:
                     target_instr = self.instrs.get(target)