]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.10] [doc] Fix typos found using codespell (GH-28744) (GH-28758)
authorChristian Clauss <cclauss@me.com>
Wed, 6 Oct 2021 13:56:57 +0000 (15:56 +0200)
committerGitHub <noreply@github.com>
Wed, 6 Oct 2021 13:56:57 +0000 (15:56 +0200)
12 files changed:
Doc/c-api/call.rst
Doc/c-api/init_config.rst
Doc/faq/design.rst
Doc/library/ast.rst
Doc/library/base64.rst
Doc/library/fileinput.rst
Doc/library/importlib.metadata.rst
Doc/library/test.rst
Doc/library/types.rst
Doc/tools/rstlint.py
Doc/using/configure.rst
Doc/whatsnew/3.10.rst

index 31dc9c8031fdb6d3af92aacd8955b206a5bade91..739b5e97d15150d36dd064394d9e90b7797c2e43 100644 (file)
@@ -185,7 +185,7 @@ Object Calling API
 Various functions are available for calling a Python object.
 Each converts its arguments to a convention supported by the called object –
 either *tp_call* or vectorcall.
-In order to do as litle conversion as possible, pick one that best fits
+In order to do as little conversion as possible, pick one that best fits
 the format of data you have available.
 
 The following table summarizes the available functions;
index fe5b83aa8dc95add4dd0e4b0f898c46485c5e41e..c037f19ce64f319d0de231384259b4ce42f282a2 100644 (file)
@@ -22,7 +22,7 @@ There are two kinds of configuration:
 * The :ref:`Isolated Configuration <init-isolated-conf>` can be used to embed
   Python into an application. It isolates Python from the system. For example,
   environments variables are ignored, the LC_CTYPE locale is left unchanged and
-  no signal handler is registred.
+  no signal handler is registered.
 
 The :c:func:`Py_RunMain` function can be used to write a customized Python
 program.
@@ -696,7 +696,7 @@ PyConfig
       * Otherwise, use the :term:`locale encoding`:
         ``nl_langinfo(CODESET)`` result.
 
-      At Python statup, the encoding name is normalized to the Python codec
+      At Python startup, the encoding name is normalized to the Python codec
       name. For example, ``"ANSI_X3.4-1968"`` is replaced with ``"ascii"``.
 
       See also the :c:member:`~PyConfig.filesystem_errors` member.
index 720b1e496eb8482ee74b29e99f2bbf6bd5f37854..0437b59d55da6e01e0213fa97fbe7ff98d934c83 100644 (file)
@@ -714,7 +714,7 @@ Why don't generators support the with statement?
 For technical reasons, a generator used directly as a context manager
 would not work correctly.  When, as is most common, a generator is used as
 an iterator run to completion, no closing is needed.  When it is, wrap
-it as "contextlib.closing(generator)" in the 'with' statment.
+it as "contextlib.closing(generator)" in the 'with' statement.
 
 
 Why are colons required for the if/while/def/class statements?
index d84c841fa4a08e549b70b8f375c64b5221c953f6..e29b5e88d71d412acc4cb9a76e7662d412ebfa80 100644 (file)
@@ -1920,7 +1920,7 @@ and classes for traversing abstract syntax trees:
    If source contains a null character ('\0'), :exc:`ValueError` is raised.
 
     .. warning::
-      Note that succesfully parsing souce code into an AST object doesn't
+      Note that successfully parsing source code into an AST object doesn't
       guarantee that the source code provided is valid Python code that can
       be executed as the compilation step can raise further :exc:`SyntaxError`
       exceptions. For instance, the source ``return 42`` generates a valid
index f91547bd58403e0106533e72c1e4e896b1692dfe..35fb7b69fa4925eb349c36f00ea75175f0a76d5b 100644 (file)
@@ -152,7 +152,7 @@ The modern interface provides:
    This version does not allow the digit 0 (zero) to the letter O (oh) and digit
    1 (one) to either the letter I (eye) or letter L (el) mappings, all these
    characters are included in the Extended Hex Alphabet and are not
-   interchangable.
+   interchangeable.
 
    .. versionadded:: 3.10
 
index b840393292412596ced80b5130e816c99a7ce960..19cf7c67754f6e620cd7a4be0341b87b8e6b1cd4 100644 (file)
@@ -50,7 +50,7 @@ You can control how files are opened by providing an opening hook via the
 *openhook* parameter to :func:`fileinput.input` or :class:`FileInput()`. The
 hook must be a function that takes two arguments, *filename* and *mode*, and
 returns an accordingly opened file-like object. If *encoding* and/or *errors*
-are specified, they will be passed to the hook as aditional keyword arguments.
+are specified, they will be passed to the hook as additional keyword arguments.
 This module provides a :func:`hook_compressed` to support compressed files.
 
 The following function is the primary interface of this module:
index c43457a3850678c46d938df6433095e498f8e55e..58c582d712413773c5a446d56a3c2419f23a55d2 100644 (file)
@@ -255,7 +255,7 @@ function::
 Package distributions
 ---------------------
 
-A convience method to resolve the distribution or
+A convenience method to resolve the distribution or
 distributions (in the case of a namespace package) for top-level
 Python packages or modules::
 
index a6cc2be4d55222840a9beedc58faac5c1eda7306..a8dc35476fc9bdc2f3333467114765267e351c70 100644 (file)
@@ -1249,7 +1249,7 @@ The :mod:`test.support.threading_helper` module provides support for threading t
    Context manager catching :class:`threading.Thread` exception using
    :func:`threading.excepthook`.
 
-   Attributes set when an exception is catched:
+   Attributes set when an exception is caught:
 
    * ``exc_type``
    * ``exc_value``
@@ -1458,7 +1458,7 @@ The :mod:`test.support.os_helper` module provides support for os tests.
 .. function:: unlink(filename)
 
    Call :func:`os.unlink` on *filename*.  On Windows platforms, this is
-   wrapped with a wait loop that checks for the existence fo the file.
+   wrapped with a wait loop that checks for the existence of the file.
 
 
 :mod:`test.support.import_helper` --- Utilities for import tests
index 88fe47a8d4a7fbf93e32f731deaa82ebe4014ada..2314b02c7449c0bcff53478e2776955cf9269743 100644 (file)
@@ -243,7 +243,7 @@ Standard names are defined for the following types:
 
       .. note::
          A future version of Python may stop setting this attribute by default.
-         To guard against this potential change, preferrably read from the
+         To guard against this potential change, preferably read from the
          :attr:`__spec__` attribute instead or use
          ``getattr(module, "__loader__", None)`` if you explicitly need to use
          this attribute.
@@ -268,7 +268,7 @@ Standard names are defined for the following types:
 
       .. note::
          A future version of Python may stop setting this attribute by default.
-         To guard against this potential change, preferrably read from the
+         To guard against this potential change, preferably read from the
          :attr:`__spec__` attribute instead or use
          ``getattr(module, "__package__", None)`` if you explicitly need to use
          this attribute.
index cbcb8eb801b1356ff654b190ae8f9e9175cea929..3092a3b2d81b780e85dba6a9107f1e13b0e03b8a 100755 (executable)
@@ -165,7 +165,7 @@ def hide_comments(lines):
     """Tool to remove comments from given lines.
 
     It yields empty lines in place of comments, so line numbers are
-    still meaningfull.
+    still meaningful.
     """
     in_multiline_comment = False
     for line in lines:
index 177f25f318bbf60470dd7e9c8b7b7320631222f2..14ffdd760f012009c4bfdb296d0ced326a7e7c21 100644 (file)
@@ -550,7 +550,7 @@ Built-in modules have no ``__file__`` attribute::
       File "<stdin>", line 1, in <module>
     AttributeError: module 'sys' has no attribute '__file__'
 
-Other C extensins are built as dynamic libraires, like the ``_asyncio`` module.
+Other C extensins are built as dynamic libraries, like the ``_asyncio`` module.
 They are built with the ``Py_BUILD_CORE_MODULE`` macro defined.
 Example on Linux x86-64::
 
index c11fe41659c2096e2ec91c028711bba2e231c347..803ba87b047e7d8c52082a13977736a8fb677a2b 100644 (file)
@@ -1579,7 +1579,7 @@ Deprecated
 
 * Currently Python accepts numeric literals immediately followed by keywords,
   for example ``0in x``, ``1or x``, ``0if 1else 2``.  It allows confusing
-  and ambigious expressions like ``[0x1for x in y]`` (which can be
+  and ambiguous expressions like ``[0x1for x in y]`` (which can be
   interpreted as ``[0x1 for x in y]`` or ``[0x1f or x in y]``).  Starting in
   this release, a deprecation warning is raised if the numeric literal is
   immediately followed by one of keywords :keyword:`and`, :keyword:`else`,
@@ -1916,7 +1916,7 @@ Changes in the Python API
   if the *globals* dictionary has no ``"__builtins__"`` key, rather than using
   ``{"None": None}`` as builtins: same behavior as :func:`eval` and
   :func:`exec` functions.  Defining a function with ``def function(...): ...``
-  in Python is not affected, globals cannot be overriden with this syntax: it
+  in Python is not affected, globals cannot be overridden with this syntax: it
   also inherits the current builtins.
   (Contributed by Victor Stinner in :issue:`42990`.)