Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/c-api/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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*).
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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`).
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,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`.
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_descr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1989,7 +1989,7 @@ def __getattr__(self, attr):
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)))

Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def __missing__(self, key):
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)

Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def f():
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:
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_unpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def test_extended_oparg_not_ignored(self):
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)
Expand Down
2 changes: 1 addition & 1 deletion Objects/object_layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down