]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Docs: Fix duplicate word typos (GH-135958)
authorBrian Schubert <brianm.schubert@gmail.com>
Fri, 27 Jun 2025 00:00:19 +0000 (20:00 -0400)
committerGitHub <noreply@github.com>
Fri, 27 Jun 2025 00:00:19 +0000 (20:00 -0400)
13 files changed:
Doc/c-api/init.rst
Doc/c-api/long.rst
Doc/extending/newtypes_tutorial.rst
Doc/library/ctypes.rst
Doc/library/email.header.rst
Doc/library/exceptions.rst
Doc/library/faulthandler.rst
Doc/library/mmap.rst
Doc/library/pathlib.rst
Doc/library/socketserver.rst
Doc/library/threading.rst
Doc/using/cmdline.rst
Doc/whatsnew/3.13.rst

index 3106bf9808f254823cd89717ebbc25e73392ad15..41fd4ea14ef12f22f93286921f2de7451fa2af94 100644 (file)
@@ -1250,7 +1250,7 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
 .. c:function:: void PyInterpreterState_Clear(PyInterpreterState *interp)
 
    Reset all information in an interpreter state object.  There must be
-   an :term:`attached thread state` for the the interpreter.
+   an :term:`attached thread state` for the interpreter.
 
    .. audit-event:: cpython.PyInterpreterState_Clear "" c.PyInterpreterState_Clear
 
index 25d9e62e3872797b87d0755fc4e21a4da564f7d6..2d0bda76697e81c8ba411c406260ea0eddd658d7 100644 (file)
@@ -439,7 +439,7 @@ distinguished from a number.  Use :c:func:`PyErr_Occurred` to disambiguate.
    All *n_bytes* of the buffer are written: large buffers are padded with
    zeroes.
 
-   If the returned value is greater than than *n_bytes*, the value was
+   If the returned value is greater than *n_bytes*, the value was
    truncated: as many of the lowest bits of the value as could fit are written,
    and the higher bits are ignored. This matches the typical behavior
    of a C-style downcast.
index f14690de4f86e8cf7a9ebb70b163af5c6ab87b96..3bbee33bd50698f3c4ff610ea68b12372f0495ec 100644 (file)
@@ -277,7 +277,7 @@ be an instance of a subclass.
    The explicit cast to ``CustomObject *`` above is needed because we defined
    ``Custom_dealloc`` to take a ``PyObject *`` argument, as the ``tp_dealloc``
    function pointer expects to receive a ``PyObject *`` argument.
-   By assigning to the the ``tp_dealloc`` slot of a type, we declare
+   By assigning to the ``tp_dealloc`` slot of a type, we declare
    that it can only be called with instances of our ``CustomObject``
    class, so the cast to ``(CustomObject *)`` is safe.
    This is object-oriented polymorphism, in C!
index e00fe9c8145f1284e7fc8857755858d455720c32..846cece3761858dc7bf377923b42e9b6009853d2 100644 (file)
@@ -2965,7 +2965,7 @@ fields, or any other data types containing pointer type fields.
    .. attribute:: is_anonymous
 
       True if this field is anonymous, that is, it contains nested sub-fields
-      that should be be merged into a containing structure or union.
+      that should be merged into a containing structure or union.
 
 
 .. _ctypes-arrays-pointers:
index c3392a62b8ee796ff9d01f219e6fd6afe37a3091..f49885b87852357066c4e8403637fde2b8354ffa 100644 (file)
@@ -206,7 +206,7 @@ The :mod:`email.header` module also provides the following convenient functions.
 
    .. note::
 
-       This function exists for for backwards compatibility only. For
+       This function exists for backwards compatibility only. For
        new code, we recommend using :class:`email.headerregistry.HeaderRegistry`.
 
 
@@ -225,5 +225,5 @@ The :mod:`email.header` module also provides the following convenient functions.
 
    .. note::
 
-       This function exists for for backwards compatibility only, and is
+       This function exists for backwards compatibility only, and is
        not recommended for use in new code.
index bb72032891ea9876ad601781a9f63c20eb7fcd79..9806ae80905ca0e4c4d669a191043a82d4123e69 100644 (file)
@@ -1048,7 +1048,7 @@ their subgroups based on the types of the contained exceptions.
    subclasses that need a different constructor signature need to
    override that rather than :meth:`~object.__init__`. For example, the following
    defines an exception group subclass which accepts an exit_code and
-   and constructs the group's message from it. ::
+   constructs the group's message from it. ::
 
       class Errors(ExceptionGroup):
          def __new__(cls, errors, exit_code):
index 5058b85bffb15c68293c94521715a8c0c408bb78..1977f4d3ba39168f797376ac92beb830941f5fa2 100644 (file)
@@ -90,7 +90,7 @@ An error will be printed instead of the stack.
 
 Additionally, some compilers do not support :term:`CPython's <CPython>`
 implementation of C stack dumps. As a result, a different error may be printed
-instead of the stack, even if the the operating system supports dumping stacks.
+instead of the stack, even if the operating system supports dumping stacks.
 
 .. note::
 
index 4e20c07331a2207e1a224713735e97cedba1eca9..8fca79b23e4e156d67df64ac608d69ebebeb4cf2 100644 (file)
@@ -269,7 +269,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
 
       Resizing a map created with *access* of :const:`ACCESS_READ` or
       :const:`ACCESS_COPY`, will raise a :exc:`TypeError` exception.
-      Resizing a map created with with *trackfd* set to ``False``,
+      Resizing a map created with *trackfd* set to ``False``,
       will raise a :exc:`ValueError` exception.
 
       **On Windows**: Resizing the map will raise an :exc:`OSError` if there are other
index 86351e65dc4ed6080adac5f680c18778008aa2a8..47986a2d9602ee410b72ba742ad39fce1c78c4e1 100644 (file)
@@ -1985,7 +1985,7 @@ The :mod:`pathlib.types` module provides types for static type checking.
 
       If *follow_symlinks* is ``False``, return ``True`` only if the path
       is a file (without following symlinks); return ``False`` if the path
-      is a directory or other other non-file, or if it doesn't exist.
+      is a directory or other non-file, or if it doesn't exist.
 
    .. method:: is_symlink()
 
index 753f12460b824b84fea0bb098350a6a920a116ec..7fb629f7d2f256c691eced88dd64fe140f08943f 100644 (file)
@@ -543,7 +543,7 @@ objects that simplify communication by providing the standard file interface)::
 
 The difference is that the ``readline()`` call in the second handler will call
 ``recv()`` multiple times until it encounters a newline character, while the
-the first handler had to use a ``recv()`` loop to accumulate data until a
+first handler had to use a ``recv()`` loop to accumulate data until a
 newline itself.  If it had just used a single ``recv()`` without the loop it
 would just have returned what has been received so far from the client.
 TCP is stream based: data arrives in the order it was sent, but there no
index 52fefd590daf182d9858686a063911ea5caa3046..cabb41442f8419648807bd79d35126045f92903b 100644 (file)
@@ -621,7 +621,7 @@ since it is impossible to detect the termination of alien threads.
       an error to :meth:`~Thread.join` a thread before it has been started
       and attempts to do so raise the same exception.
 
-      If an attempt is made to join a running daemonic thread in in late stages
+      If an attempt is made to join a running daemonic thread in late stages
       of :term:`Python finalization <interpreter shutdown>` :meth:`!join`
       raises a :exc:`PythonFinalizationError`.
 
index a5867b489e0053823596856ecdb54ebcb63b6a6b..cad49e2deeb46f8acf95e2427da2e31b3a63fd71 100644 (file)
@@ -653,7 +653,7 @@ Miscellaneous options
      .. versionadded:: 3.13
 
    * :samp:`-X thread_inherit_context={0,1}` causes :class:`~threading.Thread`
-     to, by default, use a copy of context of of the caller of
+     to, by default, use a copy of context of the caller of
      ``Thread.start()`` when starting.  Otherwise, threads will start
      with an empty context.  If unset, the value of this option defaults
      to ``1`` on free-threaded builds and to ``0`` otherwise.  See also
@@ -1284,7 +1284,7 @@ conflict.
 .. envvar:: PYTHON_THREAD_INHERIT_CONTEXT
 
    If this variable is set to ``1`` then :class:`~threading.Thread` will,
-   by default, use a copy of context of of the caller of ``Thread.start()``
+   by default, use a copy of context of the caller of ``Thread.start()``
    when starting.  Otherwise, new threads will start with an empty context.
    If unset, this variable defaults to ``1`` on free-threaded builds and to
    ``0`` otherwise.  See also :option:`-X thread_inherit_context<-X>`.
index 580a3d8154dee13e202571378d8f4a5e5cde8b5f..ef7c36d8539dfd5d93ad38ea815ba065a8207e6b 100644 (file)
@@ -1996,7 +1996,7 @@ New Deprecations
     (Contributed by Alex Waygood in :gh:`105566` and :gh:`105570`.)
 
   * Deprecate the :func:`typing.no_type_check_decorator` decorator function,
-    to be removed in in Python 3.15.
+    to be removed in Python 3.15.
     After eight years in the :mod:`typing` module,
     it has yet to be supported by any major type checker.
     (Contributed by Alex Waygood in :gh:`106309`.)