Skip to content

Commit 9646630

Browse files
GiantRobatomatrixise
authored andcommitted
bpo-36766: Typos in docs and code comments (pythonGH-13116)
1 parent 3921b1c commit 9646630

22 files changed

+22
-22
lines changed

Doc/library/email.generator.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ to be using :class:`BytesGenerator`, and not :class:`Generator`.
188188
(This is required because strings cannot represent non-ASCII bytes.)
189189
Convert any bytes with the high bit set as needed using an
190190
ASCII-compatible :mailheader:`Content-Transfer-Encoding`. That is,
191-
transform parts with non-ASCII :mailheader:`Cotnent-Transfer-Encoding`
191+
transform parts with non-ASCII :mailheader:`Content-Transfer-Encoding`
192192
(:mailheader:`Content-Transfer-Encoding: 8bit`) to an ASCII compatible
193193
:mailheader:`Content-Transfer-Encoding`, and encode RFC-invalid non-ASCII
194194
bytes in headers using the MIME ``unknown-8bit`` character set, thus

Doc/library/pyclbr.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ modules.
4444

4545
.. versionadded:: 3.7
4646
Descriptors for nested definitions. They are accessed through the
47-
new children attibute. Each has a new parent attribute.
47+
new children attribute. Each has a new parent attribute.
4848

4949
The descriptors returned by these functions are instances of
5050
Function and Class classes. Users are not expected to create instances

Lib/idlelib/configdialog.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2225,7 +2225,7 @@ def detach(self):
22252225
'General': '''
22262226
General:
22272227
2228-
AutoComplete: Popupwait is milleseconds to wait after key char, without
2228+
AutoComplete: Popupwait is milliseconds to wait after key char, without
22292229
cursor movement, before popping up completion box. Key char is '.' after
22302230
identifier or a '/' (or '\\' on Windows) within a string.
22312231

Lib/idlelib/help.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ <h3>Developing tkinter applications<a class="headerlink" href="#developing-tkint
721721
<span class="pre">root</span> <span class="pre">=</span> <span class="pre">tk.Tk()</span></code> in standard Python and nothing appears. Enter the same
722722
in IDLE and a tk window appears. In standard Python, one must also enter
723723
<code class="docutils literal notranslate"><span class="pre">root.update()</span></code> to see the window. IDLE does the equivalent in the
724-
background, about 20 times a second, which is about every 50 milleseconds.
724+
background, about 20 times a second, which is about every 50 milliseconds.
725725
Next enter <code class="docutils literal notranslate"><span class="pre">b</span> <span class="pre">=</span> <span class="pre">tk.Button(root,</span> <span class="pre">text='button');</span> <span class="pre">b.pack()</span></code>. Again,
726726
nothing visibly changes in standard Python until one enters <code class="docutils literal notranslate"><span class="pre">root.update()</span></code>.</p>
727727
<p>Most tkinter programs run <code class="docutils literal notranslate"><span class="pre">root.mainloop()</span></code>, which usually does not

Lib/idlelib/help.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Contents are subject to revision at any time, without notice.
33
44
5-
Help => About IDLE: diplay About Idle dialog
5+
Help => About IDLE: display About Idle dialog
66
77
<to be moved here from help_about.py>
88

Lib/idlelib/idle_test/test_config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ def test_get_current_keyset(self):
521521
def test_get_keyset(self):
522522
conf = self.mock_config()
523523

524-
# Conflic with key set, should be disable to ''
524+
# Conflict with key set, should be disable to ''
525525
conf.defaultCfg['extensions'].add_section('Foobar')
526526
conf.defaultCfg['extensions'].add_section('Foobar_cfgBindings')
527527
conf.defaultCfg['extensions'].set('Foobar', 'enable', 'True')

Lib/lib2to3/pgen2/tokenize.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def untokenize(iterable):
321321
Round-trip invariant for full input:
322322
Untokenized source will match input source exactly
323323
324-
Round-trip invariant for limited intput:
324+
Round-trip invariant for limited input:
325325
# Output text will tokenize the back to the input
326326
t1 = [tok[:2] for tok in generate_tokens(f.readline)]
327327
newcode = untokenize(t1)

Lib/multiprocessing/resource_sharer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def detach(self):
5959

6060

6161
class _ResourceSharer(object):
62-
'''Manager for resouces using background thread.'''
62+
'''Manager for resources using background thread.'''
6363
def __init__(self):
6464
self._key = 0
6565
self._cache = {}

Lib/pathlib.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
# Internals
3535
#
3636

37-
# EBADF - guard agains macOS `stat` throwing EBADF
37+
# EBADF - guard against macOS `stat` throwing EBADF
3838
_IGNORED_ERROS = (ENOENT, ENOTDIR, EBADF)
3939

4040
_IGNORED_WINERRORS = (

Lib/platform.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
# type information
7373
# 0.4.0 - added win32_ver() and modified the platform() output for WinXX
7474
# 0.3.4 - fixed a bug in _follow_symlinks()
75-
# 0.3.3 - fixed popen() and "file" command invokation bugs
75+
# 0.3.3 - fixed popen() and "file" command invocation bugs
7676
# 0.3.2 - added architecture() API and support for it in platform()
7777
# 0.3.1 - fixed syscmd_ver() RE to support Windows NT
7878
# 0.3.0 - added system alias support

Lib/pstats.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ def func_std_string(func_name): # match what old profile produced
509509
return "%s:%d(%s)" % func_name
510510

511511
#**************************************************************************
512-
# The following functions combine statists for pairs functions.
512+
# The following functions combine statistics for pairs functions.
513513
# The bulk of the processing involves correctly handling "call" lists,
514514
# such as callers and callees.
515515
#**************************************************************************

Lib/test/datetimetester.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3483,7 +3483,7 @@ def utcoffset(self, t):
34833483
self.assertEqual(got, expected)
34843484

34853485
# However, if they're different members, uctoffset is not ignored.
3486-
# Note that a time can't actually have an operand-depedent offset,
3486+
# Note that a time can't actually have an operand-dependent offset,
34873487
# though (and time.utcoffset() passes None to tzinfo.utcoffset()),
34883488
# so skip this test for time.
34893489
if cls is not time:

Lib/test/pickletester.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2222,7 +2222,7 @@ def remove_frames(pickled, keep_frame=None):
22222222

22232223
frame_size = self.FRAME_SIZE_TARGET
22242224
num_frames = 20
2225-
# Large byte objects (dict values) intermitted with small objects
2225+
# Large byte objects (dict values) intermittent with small objects
22262226
# (dict keys)
22272227
obj = {i: bytes([i]) * frame_size for i in range(num_frames)}
22282228

Lib/test/support/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ def temp_dir(path=None, quiet=False):
10061006
yield path
10071007
finally:
10081008
# In case the process forks, let only the parent remove the
1009-
# directory. The child has a diffent process id. (bpo-30028)
1009+
# directory. The child has a different process id. (bpo-30028)
10101010
if dir_created and pid == os.getpid():
10111011
rmtree(path)
10121012

Lib/test/test_dataclasses.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,7 @@ class C:
14581458
}
14591459
)
14601460

1461-
# Make sure that the returned dicts are actuall OrderedDicts.
1461+
# Make sure that the returned dicts are actually OrderedDicts.
14621462
self.assertIs(type(d), OrderedDict)
14631463
self.assertIs(type(d['y'][1]), OrderedDict)
14641464

Lib/test/test_importlib/test_lazy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class LazyLoaderTests(unittest.TestCase):
5656

5757
def test_init(self):
5858
with self.assertRaises(TypeError):
59-
# Classes that dono't define exec_module() trigger TypeError.
59+
# Classes that don't define exec_module() trigger TypeError.
6060
util.LazyLoader(object)
6161

6262
def new_module(self, source_code=None):

Lib/test/test_random.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ def test_choices_algorithms(self):
719719
c = self.gen.choices(range(n), cum_weights=range(1, n+1), k=10000)
720720
self.assertEqual(a, c)
721721

722-
# Amerian Roulette
722+
# American Roulette
723723
population = ['Red', 'Black', 'Green']
724724
weights = [18, 18, 2]
725725
cum_weights = [18, 36, 38]

Lib/test/test_ssl.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4332,7 +4332,7 @@ def test_pha_optional_nocert(self):
43324332
self.assertEqual(s.recv(1024), b'FALSE\n')
43334333
s.write(b'PHA')
43344334
self.assertEqual(s.recv(1024), b'OK\n')
4335-
# optional doens't fail when client does not have a cert
4335+
# optional doesn't fail when client does not have a cert
43364336
s.write(b'HASCERT')
43374337
self.assertEqual(s.recv(1024), b'FALSE\n')
43384338

Lib/test/test_tools/test_i18n.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def foo3(bar: 'func'=lambda x: x) -> {1: 2}:
211211
self.assertIn('doc3', msgids)
212212

213213
def test_classdocstring_early_colon(self):
214-
""" Test docstring extraction for a class with colons occuring within
214+
""" Test docstring extraction for a class with colons occurring within
215215
the parentheses.
216216
"""
217217
msgids = self.extract_docstrings_from_str(dedent('''\

Lib/tokenize.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def maybe(*choices): return group(*choices) + '?'
8282
# Return the empty string, plus all of the valid string prefixes.
8383
def _all_string_prefixes():
8484
# The valid string prefixes. Only contain the lower case versions,
85-
# and don't contain any permuations (include 'fr', but not
85+
# and don't contain any permutations (include 'fr', but not
8686
# 'rf'). The various permutations will be generated.
8787
_valid_string_prefixes = ['b', 'r', 'u', 'f', 'br', 'fr']
8888
# if we add binary f-strings, add: ['fb', 'fbr']

Lib/turtle.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1568,7 +1568,7 @@ def degrees(self, fullcircle=360.0):
15681568
fullcircle - a number
15691569
15701570
Set angle measurement units, i. e. set number
1571-
of 'degrees' for a full circle. Dafault value is
1571+
of 'degrees' for a full circle. Default value is
15721572
360 degrees.
15731573
15741574
Example (for a Turtle instance named turtle):

Objects/object.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2170,7 +2170,7 @@ _PyObject_AssertFailed(PyObject *obj, const char *expr, const char *msg,
21702170
fprintf(stderr, "<object: freed type %p>\n", (void *)Py_TYPE(obj));
21712171
}
21722172
else {
2173-
/* Diplay the traceback where the object has been allocated.
2173+
/* Display the traceback where the object has been allocated.
21742174
Do it before dumping repr(obj), since repr() is more likely
21752175
to crash than dumping the traceback. */
21762176
void *ptr;

0 commit comments

Comments
 (0)