Fix miscellaneous typos (#4275)

diff --git a/Lib/hashlib.py b/Lib/hashlib.py
index 053a7ad..e30c610 100644
--- a/Lib/hashlib.py
+++ b/Lib/hashlib.py
@@ -218,7 +218,7 @@
         from_bytes = int.from_bytes
         while len(dkey) < dklen:
             prev = prf(salt + loop.to_bytes(4, 'big'))
-            # endianess doesn't matter here as long to / from use the same
+            # endianness doesn't matter here as long to / from use the same
             rkey = int.from_bytes(prev, 'big')
             for i in range(iterations - 1):
                 prev = prf(prev)
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
index a1a5d80..a7a1e9f 100644
--- a/Lib/idlelib/NEWS.txt
+++ b/Lib/idlelib/NEWS.txt
@@ -81,7 +81,7 @@
 '<<zoom-height>>'.  Any (global) customizations made before 3.6.3 will
 not affect their keyset-specific customization after 3.6.3. and vice
 versa.
-  Inital patch by Charles Wohlganger, revised by Terry Jan Reedy.
+  Initial patch by Charles Wohlganger, revised by Terry Jan Reedy.
 
 bpo-31051:  Rearrange condigdialog General tab.
 Sort non-Help options into Window (Shell+Editor) and Editor (only).
diff --git a/Lib/idlelib/browser.py b/Lib/idlelib/browser.py
index a185ed5..79eaeb7 100644
--- a/Lib/idlelib/browser.py
+++ b/Lib/idlelib/browser.py
@@ -58,7 +58,7 @@
     """Browse module classes and functions in IDLE.
     """
     # This class is also the base class for pathbrowser.PathBrowser.
-    # Init and close are inherited, other methods are overriden.
+    # Init and close are inherited, other methods are overridden.
     # PathBrowser.__init__ does not call __init__ below.
 
     def __init__(self, master, path, *, _htest=False, _utest=False):
diff --git a/Lib/idlelib/idle_test/test_replace.py b/Lib/idlelib/idle_test/test_replace.py
index 2ecbd34..df76dec 100644
--- a/Lib/idlelib/idle_test/test_replace.py
+++ b/Lib/idlelib/idle_test/test_replace.py
@@ -74,14 +74,14 @@
         replace()
         equal(text.get('1.8', '1.12'), 'asdf')
 
-        # dont "match word" case
+        # don't "match word" case
         text.mark_set('insert', '1.0')
         pv.set('is')
         rv.set('hello')
         replace()
         equal(text.get('1.2', '1.7'), 'hello')
 
-        # dont "match case" case
+        # don't "match case" case
         pv.set('string')
         rv.set('world')
         replace()
diff --git a/Lib/idlelib/paragraph.py b/Lib/idlelib/paragraph.py
index cf8dfdb..1270115 100644
--- a/Lib/idlelib/paragraph.py
+++ b/Lib/idlelib/paragraph.py
@@ -158,7 +158,7 @@
     newdata = reformat_paragraph(data, format_width)
     # re-split and re-insert the comment header.
     newdata = newdata.split("\n")
-    # If the block ends in a \n, we dont want the comment prefix
+    # If the block ends in a \n, we don't want the comment prefix
     # inserted after it. (Im not sure it makes sense to reformat a
     # comment block that is not made of complete lines, but whatever!)
     # Can't think of a clean solution, so we hack away
diff --git a/Lib/numbers.py b/Lib/numbers.py
index 7eedc63..ed815ef 100644
--- a/Lib/numbers.py
+++ b/Lib/numbers.py
@@ -35,7 +35,7 @@
     In short, those are: a conversion to complex, .real, .imag, +, -,
     *, /, abs(), .conjugate, ==, and !=.
 
-    If it is given heterogenous arguments, and doesn't have special
+    If it is given heterogeneous arguments, and doesn't have special
     knowledge about them, it should fall back to the builtin complex
     type as described below.
     """
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index c7e568f..f6d03f8 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -751,7 +751,7 @@
     @property
     def universal_newlines(self):
         # universal_newlines as retained as an alias of text_mode for API
-        # compatability. bpo-31756
+        # compatibility. bpo-31756
         return self.text_mode
 
     @universal_newlines.setter
diff --git a/Lib/test/pythoninfo.py b/Lib/test/pythoninfo.py
index c238ef7..85e32a9 100644
--- a/Lib/test/pythoninfo.py
+++ b/Lib/test/pythoninfo.py
@@ -1,5 +1,5 @@
 """
-Collect various informations about Python to help debugging test failures.
+Collect various information about Python to help debugging test failures.
 """
 from __future__ import print_function
 import errno
@@ -40,7 +40,7 @@
 
     def get_infos(self):
         """
-        Get informations as a key:value dictionary where values are strings.
+        Get information as a key:value dictionary where values are strings.
         """
         return {key: str(value) for key, value in self.info.items()}
 
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index adc4e86..d051f96 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -2770,7 +2770,7 @@
         import signal
         self.signal = signal
         self.signals = list(range(1, signal.NSIG))
-        # SIGKILL and SIGSTOP signals cannot be ignored nor catched
+        # SIGKILL and SIGSTOP signals cannot be ignored nor caught
         for signame in ('SIGKILL', 'SIGSTOP'):
             try:
                 signum = getattr(signal, signame)
diff --git a/Lib/test/test_codecmaps_kr.py b/Lib/test/test_codecmaps_kr.py
index 471cd74..1b6f5ca 100644
--- a/Lib/test/test_codecmaps_kr.py
+++ b/Lib/test/test_codecmaps_kr.py
@@ -27,8 +27,8 @@
     encoding = 'johab'
     mapfileurl = 'http://www.pythontest.net/unicode/JOHAB.TXT'
     # KS X 1001 standard assigned 0x5c as WON SIGN.
-    # but, in early 90s that is the only era used johab widely,
-    # the most softwares implements it as REVERSE SOLIDUS.
+    # But the early 90s is the only era that used johab widely,
+    # most software implements it as REVERSE SOLIDUS.
     # So, we ignore the standard here.
     pass_enctest = [(b'\\', '\u20a9')]
     pass_dectest = [(b'\\', '\u20a9')]
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index 8dceb5c..9d10df5 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -943,7 +943,7 @@
         # equal to recursion_limit in PyErr_NormalizeException() and check
         # that a ResourceWarning is printed.
         # Prior to #22898, the recursivity of PyErr_NormalizeException() was
-        # controled by tstate->recursion_depth and a PyExc_RecursionErrorInst
+        # controlled by tstate->recursion_depth and a PyExc_RecursionErrorInst
         # singleton was being used in that case, that held traceback data and
         # locals indefinitely and would cause a segfault in _PyExc_Fini() upon
         # finalization of these locals.
diff --git a/Lib/test/test_hash.py b/Lib/test/test_hash.py
index 01dd777..c68e0d8 100644
--- a/Lib/test/test_hash.py
+++ b/Lib/test/test_hash.py
@@ -207,7 +207,7 @@
             [-678966196, 573763426263223372, -820489388, -4282905804826039665],
             ],
         'siphash24': [
-            # NOTE: PyUCS2 layout depends on endianess
+            # NOTE: PyUCS2 layout depends on endianness
             # seed 0, 'abc'
             [1198583518, 4596069200710135518, 1198583518, 4596069200710135518],
             # seed 42, 'abc'
diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py
index 1ef0acc..b70ec7c 100644
--- a/Lib/test/test_imp.py
+++ b/Lib/test/test_imp.py
@@ -112,7 +112,7 @@
         # Martin von Loewis note what shared library cannot have non-ascii
         # character because init_xxx function cannot be compiled
         # and issue never happens for dynamic modules.
-        # But sources modified to follow generic way for processing pathes.
+        # But sources modified to follow generic way for processing paths.
 
         # the return encoding could be uppercase or None
         fs_encoding = sys.getfilesystemencoding()
diff --git a/Lib/test/test_ordered_dict.py b/Lib/test/test_ordered_dict.py
index 93f812a..6bafb8b 100644
--- a/Lib/test/test_ordered_dict.py
+++ b/Lib/test/test_ordered_dict.py
@@ -683,7 +683,7 @@
         nodesize = calcsize('Pn2P')
 
         od = OrderedDict()
-        check(od, basicsize + 8*p + 8 + 5*entrysize)  # 8byte indicies + 8*2//3 * entry table
+        check(od, basicsize + 8*p + 8 + 5*entrysize)  # 8byte indices + 8*2//3 * entry table
         od.x = 1
         check(od, basicsize + 8*p + 8 + 5*entrysize)
         od.update([(i, i) for i in range(3)])
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 41eac23..096fb54 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -4675,7 +4675,7 @@
                          'test needs signal.alarm()')
     def testInterruptedTimeout(self):
         # XXX I don't know how to do this test on MSWindows or any other
-        # plaform that doesn't support signal.alarm() or os.kill(), though
+        # platform that doesn't support signal.alarm() or os.kill(), though
         # the bug should have existed on all platforms.
         self.serv.settimeout(5.0)   # must be longer than alarm
         class Alarm(Exception):
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index 6e1ae06..a4887af 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
@@ -427,7 +427,7 @@
         t.daemon = True
         self.assertIn('daemon', repr(t))
 
-    def test_deamon_param(self):
+    def test_daemon_param(self):
         t = threading.Thread()
         self.assertFalse(t.daemon)
         t = threading.Thread(daemon=False)
diff --git a/Lib/test/test_unicode_file.py b/Lib/test/test_unicode_file.py
index e4709a1..b16e4c5 100644
--- a/Lib/test/test_unicode_file.py
+++ b/Lib/test/test_unicode_file.py
@@ -1,5 +1,5 @@
 # Test some Unicode file name semantics
-# We dont test many operations on files other than
+# We don't test many operations on files other than
 # that their names can be used with Unicode characters.
 import os, glob, time, shutil
 import unicodedata
diff --git a/Lib/test/test_unicode_file_functions.py b/Lib/test/test_unicode_file_functions.py
index 98c716b..1cd0d62 100644
--- a/Lib/test/test_unicode_file_functions.py
+++ b/Lib/test/test_unicode_file_functions.py
@@ -17,7 +17,7 @@
     '7_\u05d4\u05e9\u05e7\u05e6\u05e5\u05e1',
     '8_\u66e8\u66e9\u66eb',
     '9_\u66e8\u05e9\u3093\u0434\u0393\xdf',
-    # Specific code points: fn, NFC(fn) and NFKC(fn) all differents
+    # Specific code points: fn, NFC(fn) and NFKC(fn) all different
     '10_\u1fee\u1ffd',
     ]
 
@@ -29,13 +29,13 @@
 # U+2FAFF are not decomposed."
 if sys.platform != 'darwin':
     filenames.extend([
-        # Specific code points: NFC(fn), NFD(fn), NFKC(fn) and NFKD(fn) all differents
+        # Specific code points: NFC(fn), NFD(fn), NFKC(fn) and NFKD(fn) all different
         '11_\u0385\u03d3\u03d4',
         '12_\u00a8\u0301\u03d2\u0301\u03d2\u0308', # == NFD('\u0385\u03d3\u03d4')
         '13_\u0020\u0308\u0301\u038e\u03ab',       # == NFKC('\u0385\u03d3\u03d4')
         '14_\u1e9b\u1fc1\u1fcd\u1fce\u1fcf\u1fdd\u1fde\u1fdf\u1fed',
 
-        # Specific code points: fn, NFC(fn) and NFKC(fn) all differents
+        # Specific code points: fn, NFC(fn) and NFKC(fn) all different
         '15_\u1fee\u1ffd\ufad1',
         '16_\u2000\u2000\u2000A',
         '17_\u2001\u2001\u2001A',
diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py
index ff55e94..3bc867e 100644
--- a/Lib/test/test_zipfile.py
+++ b/Lib/test/test_zipfile.py
@@ -1864,7 +1864,7 @@
     compression = zipfile.ZIP_LZMA
 
 
-# Privide the tell() method but not seek()
+# Provide the tell() method but not seek()
 class Tellable:
     def __init__(self, fp):
         self.fp = fp
diff --git a/Lib/turtle.py b/Lib/turtle.py
index b2623f1..8909fe9 100644
--- a/Lib/turtle.py
+++ b/Lib/turtle.py
@@ -2194,7 +2194,7 @@
 
         If turtleshape is a polygon, outline and interior of that polygon
         is drawn with the newly set colors.
-        For mor info see: pencolor, fillcolor
+        For more info see: pencolor, fillcolor
 
         Example (for a Turtle instance named turtle):
         >>> turtle.color('red', 'green')
diff --git a/Lib/unittest/test/test_case.py b/Lib/unittest/test/test_case.py
index b849591..6b34397 100644
--- a/Lib/unittest/test/test_case.py
+++ b/Lib/unittest/test/test_case.py
@@ -942,7 +942,7 @@
                           [], [divmod, 'x', 1, 5j, 2j, frozenset()])
         # comparing dicts
         self.assertCountEqual([{'a': 1}, {'b': 2}], [{'b': 2}, {'a': 1}])
-        # comparing heterogenous non-hashable sequences
+        # comparing heterogeneous non-hashable sequences
         self.assertCountEqual([1, 'x', divmod, []], [divmod, [], 'x', 1])
         self.assertRaises(self.failureException, self.assertCountEqual,
                           [], [divmod, [], 'x', 1, 5j, 2j, set()])