]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[doc] Fix typos found using codespell (GH-28744)
authorChristian Clauss <cclauss@me.com>
Tue, 5 Oct 2021 21:48:44 +0000 (23:48 +0200)
committerGitHub <noreply@github.com>
Tue, 5 Oct 2021 21:48:44 +0000 (23:48 +0200)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
16 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/dis.rst
Doc/library/enum.rst
Doc/library/fileinput.rst
Doc/library/importlib.metadata.rst
Doc/library/test.rst
Doc/library/types.rst
Doc/reference/import.rst
Doc/tools/rstlint.py
Doc/using/cmdline.rst
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 2e52679ebc5b5ded10ef4b2e36b19dee6ed45c5c..989660caeda06eaee964f245db1823549269428b 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.
@@ -706,7 +706,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 29e52ad48e115919ac1c51444eae00ffea1d6699..4ff038c8d29f1a3dddab5d6e0640f6dffc4f6bb0 100644 (file)
@@ -154,7 +154,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 9b683083f6b622f4bfdd366c056177efc4500ac9..9958dea5587f17172a5f67c4b39cb73018c7b10b 100644 (file)
@@ -725,7 +725,7 @@ iterations of the loop.
     of the stack and sets the ``f_lasti`` attribute of the frame with that value.
     Then pops the next exception from the stack uses it to restore the current exception.
     Finally it re-raises the originally popped exception.
-    Used in excpetion handler cleanup.
+    Used in exception handler cleanup.
 
     .. versionadded:: 3.11
 
index f28505a6d2ccf8cf47d90c0e2e737d4d567875e5..86bf705af77e71b5b736e1823a2ebe4aa38d3a1f 100644 (file)
@@ -651,8 +651,8 @@ Data Types
 
 ---------------
 
-Utilites and Decorators
------------------------
+Utilities and Decorators
+------------------------
 
 .. class:: auto
 
index ae31341a9e63ee6e0aadc3e859fc13115126abc7..2a2c1b3c2b921c3c5488d70f2a67f6ba626ea1cc 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 39fcba015b694759c632fe96586ec9c5b856855d..69e2a94727449783c739c959dfb70dc4ff993d96 100644 (file)
@@ -605,7 +605,7 @@ the module.
 
    ``__file__`` is optional (if set, value must be a string). It indicates
    the pathname of the file from which the module was loaded (if
-   loaded from a file), or the pathname of the shared libray file
+   loaded from a file), or the pathname of the shared library file
    for extension modules loaded dynamically from a shared library.
    It might be missing for certain types of modules, such as C
    modules that are statically linked into the interpreter, and the
index 91aed80b1e9a6cdadf4378ce809419f2c466148d..045b7d7c945df521c4abc48387606a5d95774a7d 100755 (executable)
@@ -256,7 +256,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 b42518e8731ca8b7887523a9160cbc9ef1c4d418..23a645a036aedf31405e92b901370103094c597f 100644 (file)
@@ -477,7 +477,7 @@ Miscellaneous options
    * ``-X no_debug_ranges`` disables the inclusion of the tables mapping extra
      location information (end line, start column offset and end column offset)
      to every instruction in code objects. This is useful when smaller code
-     objects and pyc files are desired as well as supressing the extra visual
+     objects and pyc files are desired as well as suppressing the extra visual
      location indicators when the interpreter displays tracebacks. See also
      :envvar:`PYTHONNODEBUGRANGES`.
    * ``-X frozen_modules`` determines whether or not frozen modules are
@@ -959,7 +959,7 @@ conflict.
    If this variable is set, it disables the inclusion of the tables mapping
    extra location information (end line, start column offset and end column
    offset) to every instruction in code objects. This is useful when smaller
-   code objects and pyc files are desired as well as supressing the extra visual
+   code objects and pyc files are desired as well as suppressing the extra visual
    location indicators when the interpreter displays tracebacks.
 
    .. versionadded:: 3.11
index a545d5a9372ac01c942262b30213537283e86b9c..a59bee4ccf0f6ee17c90a2689fec4aaae9bd2f35 100644 (file)
@@ -553,7 +553,7 @@ Built-in modules have no ``__file__`` attribute::
       File "<stdin>", line 1, in <module>
     AttributeError: module 'sys' has no attribute '__file__'
 
-Other C extensions are built as dynamic libraires, like the ``_asyncio`` module.
+Other C extensions 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 de25d158bd54af26ae3cbc4abbcbc6aa10ba622f..b063255bc3e9e4f9401a69b3334f04eeac114a0b 100644 (file)
@@ -1583,7 +1583,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`,
@@ -1920,7 +1920,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`.)