Skip to content

Commit 25bf056

Browse files
[3.12] Fix typos in docs and comments (#109619) (#109621)
Fix typos in docs and comments (#109619) Co-authored-by: Heinz-Alexander Fuetterer <[email protected]>
1 parent 196738f commit 25bf056

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

Doc/c-api/exceptions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ Exception Objects
786786
787787
Implement part of the interpreter's implementation of :keyword:`!except*`.
788788
*orig* is the original exception that was caught, and *excs* is the list of
789-
the exceptions that need to be raised. This list contains the the unhandled
789+
the exceptions that need to be raised. This list contains the unhandled
790790
part of *orig*, if any, as well as the exceptions that were raised from the
791791
:keyword:`!except*` clauses (so they have a different traceback from *orig*) and
792792
those that were reraised (and have the same traceback as *orig*).

Doc/library/typing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ These can be used as types in annotations. They all support subscription using
12911291
completely disables typechecking for a function or class.
12921292

12931293
The responsibility of how to interpret the metadata
1294-
lies with the the tool or library encountering an
1294+
lies with the tool or library encountering an
12951295
``Annotated`` annotation. A tool or library encountering an ``Annotated`` type
12961296
can scan through the metadata elements to determine if they are of interest
12971297
(e.g., using :func:`isinstance`).

Doc/whatsnew/3.12.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ create an interpreter with its own GIL::
354354
if (PyStatus_Exception(status)) {
355355
return -1;
356356
}
357-
/* The new interpeter is now active in the current thread. */
357+
/* The new interpreter is now active in the current thread. */
358358

359359
For further examples how to use the C-API for sub-interpreters with a
360360
per-interpreter GIL, see :source:`Modules/_xxsubinterpretersmodule.c`.

Doc/whatsnew/3.5.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ and improves their substitutability for lists.
921921
Docstrings produced by :func:`~collections.namedtuple` can now be updated::
922922

923923
Point = namedtuple('Point', ['x', 'y'])
924-
Point.__doc__ += ': Cartesian coodinate'
924+
Point.__doc__ += ': Cartesian coordinate'
925925
Point.x.__doc__ = 'abscissa'
926926
Point.y.__doc__ = 'ordinate'
927927

Lib/test/test_descr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1989,7 +1989,7 @@ def __getattr__(self, attr):
19891989
ns = {}
19901990
exec(code, ns)
19911991
number_attrs = ns["number_attrs"]
1992-
# Warm up the the function for quickening (PEP 659)
1992+
# Warm up the function for quickening (PEP 659)
19931993
for _ in range(30):
19941994
self.assertEqual(number_attrs(Numbers()), list(range(280)))
19951995

Lib/test/test_dynamic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def __missing__(self, key):
145145
code = "lambda: " + "+".join(f"_number_{i}" for i in range(variables))
146146
sum_func = eval(code, MyGlobals())
147147
expected = sum(range(variables))
148-
# Warm up the the function for quickening (PEP 659)
148+
# Warm up the function for quickening (PEP 659)
149149
for _ in range(30):
150150
self.assertEqual(sum_func(), expected)
151151

Lib/test/test_frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ def f():
322322
sneaky_frame_object = None
323323
gc.enable()
324324
next(g)
325-
# g.gi_frame should be the the frame object from the callback (the
325+
# g.gi_frame should be the frame object from the callback (the
326326
# one that was *requested* second, but *created* first):
327327
self.assertIs(g.gi_frame, sneaky_frame_object)
328328
finally:

Lib/test/test_unpack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def test_extended_oparg_not_ignored(self):
162162
ns = {}
163163
exec(code, ns)
164164
unpack_400 = ns["unpack_400"]
165-
# Warm up the the function for quickening (PEP 659)
165+
# Warm up the function for quickening (PEP 659)
166166
for _ in range(30):
167167
y = unpack_400(range(400))
168168
self.assertEqual(y, 399)

Objects/object_layout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ and the ``dict`` field points to the dictionary.
3636

3737
## 3.12 pre-header
3838

39-
In 3.12 the the pointer to the list of weak references is added to the
39+
In 3.12 the pointer to the list of weak references is added to the
4040
pre-header. In order to make space for it, the ``dict`` and ``values``
4141
pointers are combined into a single tagged pointer:
4242

0 commit comments

Comments
 (0)