Skip to content

Commit 61f82e0

Browse files
scopterryjreedy
authored andcommitted
Spelling fixes to docs, docstrings, and comments (GH-6374)
1 parent 0399cf9 commit 61f82e0

File tree

15 files changed

+16
-16
lines changed

15 files changed

+16
-16
lines changed

Doc/library/email.generator.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ to be using :class:`BytesGenerator`, and not :class:`Generator`.
185185
Convert any bytes with the high bit set as needed using an
186186
ASCII-compatible :mailheader:`Content-Transfer-Encoding`. That is,
187187
transform parts with non-ASCII :mailheader:`Cotnent-Transfer-Encoding`
188-
(:mailheader:`Content-Transfer-Encoding: 8bit`) to an ASCII compatibile
188+
(:mailheader:`Content-Transfer-Encoding: 8bit`) to an ASCII compatible
189189
:mailheader:`Content-Transfer-Encoding`, and encode RFC-invalid non-ASCII
190190
bytes in headers using the MIME ``unknown-8bit`` character set, thus
191191
rendering them RFC-compliant.

Doc/library/test.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ The :mod:`test.support` module defines the following functions:
746746

747747
.. function:: wait_threads_exit(timeout=60.0)
748748

749-
Context manager to wait until all threads created in the ``with`` statment
749+
Context manager to wait until all threads created in the ``with`` statement
750750
exit.
751751

752752

Include/context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ PyAPI_FUNC(PyContextToken *) PyContextVar_Set(
6565

6666

6767
/* Reset a variable to its previous value.
68-
Returns 0 on sucess, -1 on error.
68+
Returns 0 on success, -1 on error.
6969
*/
7070
PyAPI_FUNC(int) PyContextVar_Reset(
7171
PyContextVar *var, PyContextToken *token);

Include/internal/hamt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ PyHamtObject * _PyHamt_Without(PyHamtObject *o, PyObject *key);
8080
/* Find "key" in the "o" collection.
8181
8282
Return:
83-
- -1: An error ocurred.
83+
- -1: An error occurred.
8484
- 0: "key" wasn't found in "o".
8585
- 1: "key" is in "o"; "*val" is set to its value (a borrowed ref).
8686
*/

Lib/_strptime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ def _strptime(data_string, format="%a %b %d %H:%M:%S %Y"):
463463
z = z[:3] + z[4:]
464464
if len(z) > 5:
465465
if z[5] != ':':
466-
msg = f"Unconsistent use of : in {found_dict['z']}"
466+
msg = f"Inconsistent use of : in {found_dict['z']}"
467467
raise ValueError(msg)
468468
z = z[:5] + z[6:]
469469
hours = int(z[1:3])

Lib/idlelib/NEWS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ bpo-31860: The font sample in the settings dialog is now editable.
3939
Edits persist while IDLE remains open.
4040
Patch by Serhiy Storchake and Terry Jan Reedy.
4141

42-
bpo-31858: Restrict shell prompt manipulaton to the shell.
42+
bpo-31858: Restrict shell prompt manipulation to the shell.
4343
Editor and output windows only see an empty last prompt line. This
4444
simplifies the code and fixes a minor bug when newline is inserted.
4545
Sys.ps1, if present, is read on Shell start-up, but is not set or changed.

Lib/sqlite3/test/dbapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def CheckInTransactionRO(self):
161161
self.cx.in_transaction = True
162162

163163
def CheckOpenWithPathLikeObject(self):
164-
""" Checks that we can succesfully connect to a database using an object that
164+
""" Checks that we can successfully connect to a database using an object that
165165
is PathLike, i.e. has __fspath__(). """
166166
self.addCleanup(unlink, TESTFN)
167167
class Path:

Lib/test/_test_multiprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ def _on_queue_feeder_error(e, obj):
11041104
q = SafeQueue(ctx=multiprocessing.get_context())
11051105
q.put(not_serializable_obj)
11061106

1107-
# Verify that q is still functionning correctly
1107+
# Verify that q is still functioning correctly
11081108
q.put(True)
11091109
self.assertTrue(q.get(timeout=1.0))
11101110

Lib/test/test__xxsubinterpreters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ def test_drop_close_if_unassociated(self):
10011001
interpreters.channel_recv(cid)
10021002

10031003
def test_drop_partially(self):
1004-
# XXX Is partial close too wierd/confusing?
1004+
# XXX Is partial close too weird/confusing?
10051005
cid = interpreters.channel_create()
10061006
interpreters.channel_send(cid, None)
10071007
interpreters.channel_recv(cid)

Lib/test/test_socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5948,7 +5948,7 @@ def test_sendmsg_afalg_args(self):
59485948
@unittest.skipUnless(sys.platform.startswith("win"), "requires Windows")
59495949
class TestMSWindowsTCPFlags(unittest.TestCase):
59505950
knownTCPFlags = {
5951-
# avaliable since long time ago
5951+
# available since long time ago
59525952
'TCP_MAXSEG',
59535953
'TCP_NODELAY',
59545954
# available starting with Windows 10 1607

Lib/test/test_strptime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def test_bad_offset(self):
363363
_strptime._strptime("-01:30:30:123456", "%z")
364364
with self.assertRaises(ValueError) as err:
365365
_strptime._strptime("-01:3030", "%z")
366-
self.assertEqual("Unconsistent use of : in -01:3030", str(err.exception))
366+
self.assertEqual("Inconsistent use of : in -01:3030", str(err.exception))
367367

368368
def test_timezone(self):
369369
# Test timezone directives.

Lib/typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ def __mro_entries__(self, bases):
732732
return (self.__origin__,)
733733

734734
def __getattr__(self, attr):
735-
# We are carefull for copy and pickle.
735+
# We are careful for copy and pickle.
736736
# Also for simplicity we just don't relay all dunder names
737737
if '__origin__' in self.__dict__ and not _is_dunder(attr):
738738
return getattr(self.__origin__, attr)

Objects/dictobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2573,7 +2573,7 @@ PyDict_Copy(PyObject *o)
25732573
(3) if 'mp' is non-compact ('del' operation does not resize dicts),
25742574
do fast-copy only if it has at most 1/3 non-used keys.
25752575
2576-
The last condition (3) is important to guard against a pathalogical
2576+
The last condition (3) is important to guard against a pathological
25772577
case when a large dict is almost emptied with multiple del/pop
25782578
operations and copied after that. In cases like this, we defer to
25792579
PyDict_Merge, which produces a compacted copy.

Python/fileutils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ decode_current_locale(const char* arg, wchar_t **wstr, size_t *wlen,
431431
can be decoded as a surrogate character, escape the bytes using the
432432
surrogateescape error handler instead of decoding them.
433433
434-
On sucess, return 0 and write the newly allocated wide character string into
434+
On success, return 0 and write the newly allocated wide character string into
435435
*wstr (use PyMem_RawFree() to free the memory). If wlen is not NULL, write
436436
the number of wide characters excluding the null character into *wlen.
437437

Python/hamt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Now let's partition this bit representation of the hash into blocks of
3939
0b00_00000_10010_11101_00101_01011_10000 = 19830128
4040
(6) (5) (4) (3) (2) (1)
4141
42-
Each block of 5 bits represents a number betwen 0 and 31. So if we have
42+
Each block of 5 bits represents a number between 0 and 31. So if we have
4343
a tree that consists of nodes, each of which is an array of 32 pointers,
4444
those 5-bit blocks will encode a position on a single tree level.
4545
@@ -832,7 +832,7 @@ hamt_node_bitmap_assoc(PyHamtNode_Bitmap *self,
832832
pairs.
833833
834834
Small hamt objects (<30 keys) usually don't have any
835-
Array nodes at all. Betwen ~30 and ~400 keys hamt
835+
Array nodes at all. Between ~30 and ~400 keys hamt
836836
objects usually have one Array node, and usually it's
837837
a root node.
838838
*/

0 commit comments

Comments
 (0)