]> granicus.if.org Git - python/commitdiff
bpo-36766: Typos in docs and code comments (GH-13116)
authorpenguindustin <penguindustin@gmail.com>
Mon, 6 May 2019 18:57:17 +0000 (14:57 -0400)
committerStéphane Wirtel <stephane@wirtel.be>
Mon, 6 May 2019 18:57:17 +0000 (14:57 -0400)
22 files changed:
Doc/library/email.generator.rst
Doc/library/pyclbr.rst
Lib/idlelib/configdialog.py
Lib/idlelib/help.html
Lib/idlelib/help.py
Lib/idlelib/idle_test/test_config.py
Lib/lib2to3/pgen2/tokenize.py
Lib/multiprocessing/resource_sharer.py
Lib/pathlib.py
Lib/platform.py
Lib/pstats.py
Lib/test/datetimetester.py
Lib/test/pickletester.py
Lib/test/support/__init__.py
Lib/test/test_dataclasses.py
Lib/test/test_importlib/test_lazy.py
Lib/test/test_random.py
Lib/test/test_ssl.py
Lib/test/test_tools/test_i18n.py
Lib/tokenize.py
Lib/turtle.py
Objects/object.c

index fc535a3e4399ff58f949a54fb307adef1b982f6d..c09ae8cbc604107baacd753d6d386562bdb59ad0 100644 (file)
@@ -188,7 +188,7 @@ to be using :class:`BytesGenerator`, and not :class:`Generator`.
       (This is required because strings cannot represent non-ASCII bytes.)
       Convert any bytes with the high bit set as needed using an
       ASCII-compatible :mailheader:`Content-Transfer-Encoding`.  That is,
-      transform parts with non-ASCII :mailheader:`Cotnent-Transfer-Encoding`
+      transform parts with non-ASCII :mailheader:`Content-Transfer-Encoding`
       (:mailheader:`Content-Transfer-Encoding: 8bit`) to an ASCII compatible
       :mailheader:`Content-Transfer-Encoding`, and encode RFC-invalid non-ASCII
       bytes in headers using the MIME ``unknown-8bit`` character set, thus
index a70c8df6a7b1194b277867cdd5069f4da1fbaa0e..b80a2faed9b424e0e2b78538f5b839e10459aae5 100644 (file)
@@ -44,7 +44,7 @@ modules.
 
 .. versionadded:: 3.7
    Descriptors for nested definitions.  They are accessed through the
-   new children attibute.  Each has a new parent attribute.
+   new children attribute.  Each has a new parent attribute.
 
 The descriptors returned by these functions are instances of
 Function and Class classes.  Users are not expected to create instances
index 31520a3b0d1e36dfc1ec17d0a1b3621b71548a0b..4aaec1321f7d68792c78dd78ef5dfee91cc805b6 100644 (file)
@@ -2225,7 +2225,7 @@ key set, with a different name.
      'General': '''
 General:
 
-AutoComplete: Popupwait is milleseconds to wait after key char, without
+AutoComplete: Popupwait is milliseconds to wait after key char, without
 cursor movement, before popping up completion box.  Key char is '.' after
 identifier or a '/' (or '\\' on Windows) within a string.
 
index 7e743e6d8137b502a26d9ffd8c8eeed6c0d17eec..ba44331e87b223d8c0c1c7dc6aa7e31e0ead6a78 100644 (file)
@@ -721,7 +721,7 @@ facilitate development of tkinter programs.  Enter <code class="docutils literal
 <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
 in IDLE and a tk window appears.  In standard Python, one must also enter
 <code class="docutils literal notranslate"><span class="pre">root.update()</span></code> to see the window.  IDLE does the equivalent in the
-background, about 20 times a second, which is about every 50 milleseconds.
+background, about 20 times a second, which is about every 50 milliseconds.
 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,
 nothing visibly changes in standard Python until one enters <code class="docutils literal notranslate"><span class="pre">root.update()</span></code>.</p>
 <p>Most tkinter programs run <code class="docutils literal notranslate"><span class="pre">root.mainloop()</span></code>, which usually does not
index 0603ede822badf8315bdb053b50e414b5ee61462..652444a7f14937303d84eb43e8add92775109c19 100644 (file)
@@ -2,7 +2,7 @@
 Contents are subject to revision at any time, without notice.
 
 
-Help => About IDLE: diplay About Idle dialog
+Help => About IDLE: display About Idle dialog
 
 <to be moved here from help_about.py>
 
index 7e2c1fd2958ceefc4fa28c9df6b7504166a3db33..255210df7d96088562443465cad3633cfc6693d0 100644 (file)
@@ -521,7 +521,7 @@ class IdleConfTest(unittest.TestCase):
     def test_get_keyset(self):
         conf = self.mock_config()
 
-        # Conflic with key set, should be disable to ''
+        # Conflict with key set, should be disable to ''
         conf.defaultCfg['extensions'].add_section('Foobar')
         conf.defaultCfg['extensions'].add_section('Foobar_cfgBindings')
         conf.defaultCfg['extensions'].set('Foobar', 'enable', 'True')
index c07b34f7c6452d16ad7c053e0aabaa47ed0f14ed..279d322971da991a0a00e157a8b0a0e75f2bdfb7 100644 (file)
@@ -321,7 +321,7 @@ def untokenize(iterable):
     Round-trip invariant for full input:
         Untokenized source will match input source exactly
 
-    Round-trip invariant for limited intput:
+    Round-trip invariant for limited input:
         # Output text will tokenize the back to the input
         t1 = [tok[:2] for tok in generate_tokens(f.readline)]
         newcode = untokenize(t1)
index 730b2aa17bdf0b90666efa5092c4ab4d7a114f26..8d5c9900f69fede88b477e49d312ae631128266e 100644 (file)
@@ -59,7 +59,7 @@ else:
 
 
 class _ResourceSharer(object):
-    '''Manager for resouces using background thread.'''
+    '''Manager for resources using background thread.'''
     def __init__(self):
         self._key = 0
         self._cache = {}
index 1ba98b19e833444bdd806b5eb97de608a5e50ef3..952cd94921e4b7d0046268b281899d1c7543b1e1 100644 (file)
@@ -34,7 +34,7 @@ __all__ = [
 # Internals
 #
 
-# EBADF - guard agains macOS `stat` throwing EBADF
+# EBADF - guard against macOS `stat` throwing EBADF
 _IGNORED_ERROS = (ENOENT, ENOTDIR, EBADF)
 
 _IGNORED_WINERRORS = (
index 9f7bd95980a15cc8668edfd23b6be8ad4729f9db..6fbb7b08c598e3d1782479ab492e4d8c964604ef 100755 (executable)
@@ -72,7 +72,7 @@
 #            type information
 #    0.4.0 - added win32_ver() and modified the platform() output for WinXX
 #    0.3.4 - fixed a bug in _follow_symlinks()
-#    0.3.3 - fixed popen() and "file" command invokation bugs
+#    0.3.3 - fixed popen() and "file" command invocation bugs
 #    0.3.2 - added architecture() API and support for it in platform()
 #    0.3.1 - fixed syscmd_ver() RE to support Windows NT
 #    0.3.0 - added system alias support
index ded5ae59f7da21f2d6b716d1b9509ff785f4aacb..b7649ebc6f1c65687589ee411428d05ebce5b4bf 100644 (file)
@@ -509,7 +509,7 @@ def func_std_string(func_name): # match what old profile produced
         return "%s:%d(%s)" % func_name
 
 #**************************************************************************
-# The following functions combine statists for pairs functions.
+# The following functions combine statistics for pairs functions.
 # The bulk of the processing involves correctly handling "call" lists,
 # such as callers and callees.
 #**************************************************************************
index 9fe32ebc5b395faa7c8bd38f3218133c09f53f9e..af0047fafd8770e791ad7a39e782d72f2b726243 100644 (file)
@@ -3483,7 +3483,7 @@ class TZInfoBase:
                     self.assertEqual(got, expected)
 
         # However, if they're different members, uctoffset is not ignored.
-        # Note that a time can't actually have an operand-depedent offset,
+        # Note that a time can't actually have an operand-dependent offset,
         # though (and time.utcoffset() passes None to tzinfo.utcoffset()),
         # so skip this test for time.
         if cls is not time:
index 8f687c49e69049e4e786d15466270bb8093549a1..bb8e6ce0964fc437725f3f13176813829a5224bf 100644 (file)
@@ -2222,7 +2222,7 @@ class AbstractPickleTests(unittest.TestCase):
 
         frame_size = self.FRAME_SIZE_TARGET
         num_frames = 20
-        # Large byte objects (dict values) intermitted with small objects
+        # Large byte objects (dict values) intermittent with small objects
         # (dict keys)
         obj = {i: bytes([i]) * frame_size for i in range(num_frames)}
 
index dc96318b38f7b9a4cdfc28aaba0e0a3abeb2e7e7..9e60d960ab12f4dd8a3f61db5b3d10eda6861e7c 100644 (file)
@@ -1006,7 +1006,7 @@ def temp_dir(path=None, quiet=False):
         yield path
     finally:
         # In case the process forks, let only the parent remove the
-        # directory. The child has a diffent process id. (bpo-30028)
+        # directory. The child has a different process id. (bpo-30028)
         if dir_created and pid == os.getpid():
             rmtree(path)
 
index d320a969876e3b421cd4608a636f395f60c40fcf..867210688f5737f8d8034d26492be73e557e5a1c 100755 (executable)
@@ -1458,7 +1458,7 @@ class TestCase(unittest.TestCase):
                              }
                          )
 
-        # Make sure that the returned dicts are actuall OrderedDicts.
+        # Make sure that the returned dicts are actually OrderedDicts.
         self.assertIs(type(d), OrderedDict)
         self.assertIs(type(d['y'][1]), OrderedDict)
 
index ffd8dc6cb0411610abed8aec12658d49d78fa8d0..28608e95d060fe6384618d6485278886d04f8817 100644 (file)
@@ -56,7 +56,7 @@ class LazyLoaderTests(unittest.TestCase):
 
     def test_init(self):
         with self.assertRaises(TypeError):
-            # Classes that dono't define exec_module() trigger TypeError.
+            # Classes that don't define exec_module() trigger TypeError.
             util.LazyLoader(object)
 
     def new_module(self, source_code=None):
index e818a7b28d433343787f83c805cbfecbf7ca931a..ff1ddcaf140745160d98562edb1f961d768ffa73 100644 (file)
@@ -719,7 +719,7 @@ class MersenneTwister_TestBasicOps(TestBasicOps, unittest.TestCase):
         c = self.gen.choices(range(n), cum_weights=range(1, n+1), k=10000)
         self.assertEqual(a, c)
 
-        # Amerian Roulette
+        # American Roulette
         population = ['Red', 'Black', 'Green']
         weights = [18, 18, 2]
         cum_weights = [18, 36, 38]
index 4444e945952fc3ad1e290295a5d35b707aa3b6de..5b53b8250f68a5716ece4409b4dc4581df69df66 100644 (file)
@@ -4332,7 +4332,7 @@ class TestPostHandshakeAuth(unittest.TestCase):
                 self.assertEqual(s.recv(1024), b'FALSE\n')
                 s.write(b'PHA')
                 self.assertEqual(s.recv(1024), b'OK\n')
-                # optional doens't fail when client does not have a cert
+                # optional doesn't fail when client does not have a cert
                 s.write(b'HASCERT')
                 self.assertEqual(s.recv(1024), b'FALSE\n')
 
index 8b2b90d6142bb406a3568da0d74233767c2b44ba..42e20f8f7716dbe82e2c36b62d4914e8fdc52cab 100644 (file)
@@ -211,7 +211,7 @@ class Test_pygettext(unittest.TestCase):
         self.assertIn('doc3', msgids)
 
     def test_classdocstring_early_colon(self):
-        """ Test docstring extraction for a class with colons occuring within
+        """ Test docstring extraction for a class with colons occurring within
         the parentheses.
         """
         msgids = self.extract_docstrings_from_str(dedent('''\
index cf1ecc99a944388c376c1c1aa1771cf5243d784e..0f9d5dd554d530050413dbc133a95d5c5d74bb39 100644 (file)
@@ -82,7 +82,7 @@ Number = group(Imagnumber, Floatnumber, Intnumber)
 # Return the empty string, plus all of the valid string prefixes.
 def _all_string_prefixes():
     # The valid string prefixes. Only contain the lower case versions,
-    #  and don't contain any permuations (include 'fr', but not
+    #  and don't contain any permutations (include 'fr', but not
     #  'rf'). The various permutations will be generated.
     _valid_string_prefixes = ['b', 'r', 'u', 'f', 'br', 'fr']
     # if we add binary f-strings, add: ['fb', 'fbr']
index 47a94f2a4702ffb0a4cef44107cb15b364112b72..044d91cf6d837e9938423de7c500418ee655938b 100644 (file)
@@ -1568,7 +1568,7 @@ class TNavigator(object):
         fullcircle -  a number
 
         Set angle measurement units, i. e. set number
-        of 'degrees' for a full circle. Dafault value is
+        of 'degrees' for a full circle. Default value is
         360 degrees.
 
         Example (for a Turtle instance named turtle):
index 732f9ccefa877415479f89b86e3271b831e14529..cb727943cb342efe5178a13a0c27569aa310dcba 100644 (file)
@@ -2170,7 +2170,7 @@ _PyObject_AssertFailed(PyObject *obj, const char *expr, const char *msg,
         fprintf(stderr, "<object: freed type %p>\n", (void *)Py_TYPE(obj));
     }
     else {
-        /* Diplay the traceback where the object has been allocated.
+        /* Display the traceback where the object has been allocated.
            Do it before dumping repr(obj), since repr() is more likely
            to crash than dumping the traceback. */
         void *ptr;