[3.12] Fix typos in docs and comments (#109619) (#109621)

Fix typos in docs and comments (#109619)

Co-authored-by: Heinz-Alexander Fuetterer <35225576+afuetterer@users.noreply.github.com>
This commit is contained in:
Alex Waygood 2023-10-02 18:34:49 +01:00 committed by GitHub
parent 196738fc86
commit 25bf0564c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 9 additions and 9 deletions

View file

@ -786,7 +786,7 @@ Exception Objects
Implement part of the interpreter's implementation of :keyword:`!except*`. Implement part of the interpreter's implementation of :keyword:`!except*`.
*orig* is the original exception that was caught, and *excs* is the list of *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 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 :keyword:`!except*` clauses (so they have a different traceback from *orig*) and
those that were reraised (and have the same traceback as *orig*). those that were reraised (and have the same traceback as *orig*).

View 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. completely disables typechecking for a function or class.
The responsibility of how to interpret the metadata 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 ``Annotated`` annotation. A tool or library encountering an ``Annotated`` type
can scan through the metadata elements to determine if they are of interest can scan through the metadata elements to determine if they are of interest
(e.g., using :func:`isinstance`). (e.g., using :func:`isinstance`).

View file

@ -354,7 +354,7 @@ create an interpreter with its own GIL::
if (PyStatus_Exception(status)) { if (PyStatus_Exception(status)) {
return -1; 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 For further examples how to use the C-API for sub-interpreters with a
per-interpreter GIL, see :source:`Modules/_xxsubinterpretersmodule.c`. per-interpreter GIL, see :source:`Modules/_xxsubinterpretersmodule.c`.

View file

@ -921,7 +921,7 @@ and improves their substitutability for lists.
Docstrings produced by :func:`~collections.namedtuple` can now be updated:: Docstrings produced by :func:`~collections.namedtuple` can now be updated::
Point = namedtuple('Point', ['x', 'y']) Point = namedtuple('Point', ['x', 'y'])
Point.__doc__ += ': Cartesian coodinate' Point.__doc__ += ': Cartesian coordinate'
Point.x.__doc__ = 'abscissa' Point.x.__doc__ = 'abscissa'
Point.y.__doc__ = 'ordinate' Point.y.__doc__ = 'ordinate'

View file

@ -1989,7 +1989,7 @@ order (MRO) for bases """
ns = {} ns = {}
exec(code, ns) exec(code, ns)
number_attrs = ns["number_attrs"] 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): for _ in range(30):
self.assertEqual(number_attrs(Numbers()), list(range(280))) self.assertEqual(number_attrs(Numbers()), list(range(280)))

View file

@ -145,7 +145,7 @@ class RebindBuiltinsTests(unittest.TestCase):
code = "lambda: " + "+".join(f"_number_{i}" for i in range(variables)) code = "lambda: " + "+".join(f"_number_{i}" for i in range(variables))
sum_func = eval(code, MyGlobals()) sum_func = eval(code, MyGlobals())
expected = sum(range(variables)) 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): for _ in range(30):
self.assertEqual(sum_func(), expected) self.assertEqual(sum_func(), expected)

View file

@ -322,7 +322,7 @@ class TestIncompleteFrameAreInvisible(unittest.TestCase):
sneaky_frame_object = None sneaky_frame_object = None
gc.enable() gc.enable()
next(g) 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): # one that was *requested* second, but *created* first):
self.assertIs(g.gi_frame, sneaky_frame_object) self.assertIs(g.gi_frame, sneaky_frame_object)
finally: finally:

View file

@ -162,7 +162,7 @@ class TestCornerCases(unittest.TestCase):
ns = {} ns = {}
exec(code, ns) exec(code, ns)
unpack_400 = ns["unpack_400"] 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): for _ in range(30):
y = unpack_400(range(400)) y = unpack_400(range(400))
self.assertEqual(y, 399) self.assertEqual(y, 399)

View file

@ -36,7 +36,7 @@ and the ``dict`` field points to the dictionary.
## 3.12 pre-header ## 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`` pre-header. In order to make space for it, the ``dict`` and ``values``
pointers are combined into a single tagged pointer: pointers are combined into a single tagged pointer: