Skip to content

Commit 4fcdde2

Browse files
Wulian233blhsing
authored andcommitted
Fix typos in comments (python#123201)
1 parent d6bbeac commit 4fcdde2

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

Lib/test/test_asyncio/test_timeouts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ async def test_nested_timeouts_loop_busy(self):
220220
# Pretend the loop is busy for a while.
221221
time.sleep(0.1)
222222
await asyncio.sleep(1)
223-
# TimeoutError was cought by (2)
223+
# TimeoutError was caught by (2)
224224
await asyncio.sleep(10) # This sleep should be interrupted by (1)
225225
t1 = loop.time()
226226
self.assertTrue(t0 <= t1 <= t0 + 1)

Lib/test/test_capi/test_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def __del__(self):
104104
''')
105105
proc = assert_python_ok("-c", code)
106106
warnings = proc.err.splitlines()
107-
# Due to the finalization of the interpreter, the source will be ommited
107+
# Due to the finalization of the interpreter, the source will be omitted
108108
# because the ``warnings`` module cannot be imported at this time
109109
self.assertEqual(warnings, [
110110
b'<string>:7: RuntimeWarning: Testing PyErr_WarnEx',

Lib/test/test_pdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ def test_post_mortem_context_of_the_cause():
12631263
def test_post_mortem_from_none():
12641264
"""Test post mortem traceback debugging of chained exception
12651265
1266-
In particular that cause from None (which sets __supress_context__ to True)
1266+
In particular that cause from None (which sets __suppress_context__ to True)
12671267
does not show context.
12681268
12691269

Lib/test/test_statistics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2799,7 +2799,7 @@ def test_sqrtprod_helper_function_fundamentals(self):
27992799
@requires_IEEE_754
28002800
@unittest.skipIf(HAVE_DOUBLE_ROUNDING,
28012801
"accuracy not guaranteed on machines with double rounding")
2802-
@support.cpython_only # Allow for a weaker sumprod() implmentation
2802+
@support.cpython_only # Allow for a weaker sumprod() implementation
28032803
def test_sqrtprod_helper_function_improved_accuracy(self):
28042804
# Test a known example where accuracy is improved
28052805
x, y, target = 0.8035720646477457, 0.7957468097636939, 0.7996498651651661

Lib/test/test_typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2500,7 +2500,7 @@ def test_concatenate(self):
25002500

25012501
def test_nested_paramspec(self):
25022502
# Since Callable has some special treatment, we want to be sure
2503-
# that substituion works correctly, see gh-103054
2503+
# that substitution works correctly, see gh-103054
25042504
Callable = self.Callable
25052505
P = ParamSpec('P')
25062506
P2 = ParamSpec('P2')

Lib/test/test_unicodedata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,15 @@ def test_no_names_in_pua(self):
114114

115115
def test_lookup_nonexistant(self):
116116
# just make sure that lookup can fail
117-
for nonexistant in [
117+
for nonexistent in [
118118
"LATIN SMLL LETR A",
119119
"OPEN HANDS SIGHS",
120120
"DREGS",
121121
"HANDBUG",
122122
"MODIFIER LETTER CYRILLIC SMALL QUESTION MARK",
123123
"???",
124124
]:
125-
self.assertRaises(KeyError, self.db.lookup, nonexistant)
125+
self.assertRaises(KeyError, self.db.lookup, nonexistent)
126126

127127
def test_digit(self):
128128
self.assertEqual(self.db.digit('A', None), None)

Lib/tkinter/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4490,7 +4490,7 @@ def data(self, format=None, *, from_coords=None,
44904490
The FORMAT option specifies the name of the image file format
44914491
handler to be used. If this option is not given, this method uses
44924492
a format that consists of a tuple (one element per row) of strings
4493-
containings space separated (one element per pixel/column) colors
4493+
containing space-separated (one element per pixel/column) colors
44944494
in “#RRGGBB” format (where RR is a pair of hexadecimal digits for
44954495
the red channel, GG for green, and BB for blue).
44964496

Modules/_ctypes/_ctypes_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ _testfunc_array_in_struct3B_set_defaults(void)
187187
/*
188188
* Test3C struct tests the MAX_STRUCT_SIZE 32. Structs containing arrays of up
189189
* to four floating-point types are passed in registers on Arm platforms.
190-
* This struct is used for within bounds test on Arm platfroms and for an
191-
* out-of-bounds tests for platfroms where MAX_STRUCT_SIZE is less than 32.
190+
* This struct is used for within-bounds tests on Arm platforms and for an
191+
* out-of-bounds test for platforms where MAX_STRUCT_SIZE is less than 32.
192192
* See gh-110190.
193193
*/
194194
typedef struct {

Objects/object.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,9 +1258,9 @@ PyObject_GetOptionalAttr(PyObject *v, PyObject *name, PyObject **result)
12581258
return 0;
12591259
}
12601260
if (tp->tp_getattro == _Py_type_getattro) {
1261-
int supress_missing_attribute_exception = 0;
1262-
*result = _Py_type_getattro_impl((PyTypeObject*)v, name, &supress_missing_attribute_exception);
1263-
if (supress_missing_attribute_exception) {
1261+
int suppress_missing_attribute_exception = 0;
1262+
*result = _Py_type_getattro_impl((PyTypeObject*)v, name, &suppress_missing_attribute_exception);
1263+
if (suppress_missing_attribute_exception) {
12641264
// return 0 without having to clear the exception
12651265
return 0;
12661266
}

0 commit comments

Comments
 (0)