]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix spelling and grammar in documentation and code comments
authorMartin Panter <vadmium+py@gmail.com>
Thu, 4 Aug 2016 13:07:31 +0000 (13:07 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Thu, 4 Aug 2016 13:07:31 +0000 (13:07 +0000)
14 files changed:
Doc/library/pdb.rst
Include/unicodeobject.h
Lib/test/test_cmd_line.py
Lib/test/test_docxmlrpc.py
Lib/test/test_socket.py
Lib/threading.py
Lib/tkinter/ttk.py
Misc/HISTORY
Misc/NEWS
Misc/coverity_model.c
Objects/odictobject.c
Objects/typeobject.c
Python/ast.c
Tools/i18n/pygettext.py

index 4520a9b6f3954994b4cef0859721989eaea834c0..471d1ea83de2b3ed2e590a1da62adccfee67b2e2 100644 (file)
@@ -449,7 +449,7 @@ by the local file.
 
 .. pdbcommand:: interact
 
-   Start an interative interpreter (using the :mod:`code` module) whose global
+   Start an interactive interpreter (using the :mod:`code` module) whose global
    namespace contains all the (global and local) names found in the current
    scope.
 
index 533dd75d2c7902a8dc3d1561a0deffd04daa4f7b..0128d7fc937595f7e3791d29f118241fa833eb63 100644 (file)
@@ -2014,7 +2014,7 @@ PyAPI_FUNC(int) PyUnicode_CompareWithASCIIString(
 /* Rich compare two strings and return one of the following:
 
    - NULL in case an exception was raised
-   - Py_True or Py_False for successfully comparisons
+   - Py_True or Py_False for successful comparisons
    - Py_NotImplemented in case the type combination is unknown
 
    Note that Py_EQ and Py_NE comparisons can cause a UnicodeWarning in
index dce418b65cbf48ae575086522122a7c1bd07c692..3d2f769a2c1f198e2911b5da5e21f6b8745f816a 100644 (file)
@@ -465,7 +465,7 @@ class CmdLineTest(unittest.TestCase):
         rc, out, err = assert_python_ok('-I', '-c',
             'from sys import flags as f; '
             'print(f.no_user_site, f.ignore_environment, f.isolated)',
-            # dummyvar to prevent extranous -E
+            # dummyvar to prevent extraneous -E
             dummyvar="")
         self.assertEqual(out.strip(), b'1 1 1')
         with test.support.temp_cwd() as tmpdir:
index e6ca96117d0ecc4303bc00fc55359fc0682fd085..15a4ae2dc61df04243144afd2bef17c6270b3168 100644 (file)
@@ -164,7 +164,7 @@ class DocXMLRPCHTTPGETServer(unittest.TestCase):
     @make_request_and_skipIf(sys.flags.optimize >= 2,
                      "Docstrings are omitted with -O2 and above")
     def test_system_methods(self):
-        """Test the precense of three consecutive system.* methods.
+        """Test the presence of three consecutive system.* methods.
 
         This also tests their use of parameter type recognition and the
         systems related to that process.
index c151a50dcb7a8ba0f357584638392737592da603..4b047ee76ab790a4277e42b796f5a52cd2a105ea 100644 (file)
@@ -709,7 +709,7 @@ class GeneralModuleTests(unittest.TestCase):
             raise socket.gaierror
 
     def testSendtoErrors(self):
-        # Testing that sendto doesn't masks failures. See #10169.
+        # Testing that sendto doesn't mask failures. See #10169.
         s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
         self.addCleanup(s.close)
         s.bind(('', 0))
index c9f8cb64eea044ddcbd146c3a261995278bbbca8..06b7b9b4fac598b6cd350b11023a8f34b45e646a 100644 (file)
@@ -639,7 +639,7 @@ class Barrier:
             self._break()
             raise
 
-    # Wait in the barrier until we are relased.  Raise an exception
+    # Wait in the barrier until we are released.  Raise an exception
     # if the barrier is reset or broken.
     def _wait(self, timeout):
         if not self._cond.wait_for(lambda : self._state != 0, timeout):
index 0e5759d8d136487c2f938241655c93d1aa94096f..f4a6d8cf54569822a04f26d5a65c274642ea1f1b 100644 (file)
@@ -151,7 +151,7 @@ def _format_elemcreate(etype, script=False, *args, **kw):
 
 def _format_layoutlist(layout, indent=0, indent_size=2):
     """Formats a layout list so we can pass the result to ttk::style
-    layout and ttk::style settings. Note that the layout doesn't has to
+    layout and ttk::style settings. Note that the layout doesn't have to
     be a list necessarily.
 
     E.g.:
index 06eb979e52de5ac8a6e632b6c434fbf48b4d984b..98e9041a55118e12afe33ca7731d450531a913f1 100644 (file)
@@ -1339,7 +1339,7 @@ Core and Builtins
 Library
 -------
 
-- Issue #14768: os.path.expanduser('~/a') doesn't works correctly when HOME is '/'.
+- Issue #14768: os.path.expanduser('~/a') doesn't work correctly when HOME is '/'.
 
 - Issue #14371: Support bzip2 in zipfile module.  Patch by Serhiy Storchaka.
 
@@ -23970,7 +23970,7 @@ in Python.  An example completer, rlcompleter.py, is provided.
 
 - The traceback.py module has a new function tb_lineno() by Marc-Andre
 Lemburg which extracts the line number from the linenumber table in
-the code object.  Apparently the traceback object doesn't contains the
+the code object.  Apparently the traceback object doesn't contain the
 right linenumber when -O is used.  Rather than guessing whether -O is
 on or off, the module itself uses tb_lineno() unconditionally.
 
index fe81bbd7cbb8a1a9a7c2be43fa51c822d86758ab..cdbb1a4d6aa65225dce4869445c819daa82822c9 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -7127,7 +7127,7 @@ Library
   on Windows and adds no value over and above python -m pydoc ...
 
 - Issue #18155: The csv module now correctly handles csv files that use
-  a delimter character that has a special meaning in regexes, instead of
+  a delimiter character that has a special meaning in regexes, instead of
   throwing an exception.
 
 - Issue #14360: encode_quopri can now be successfully used as an encoder
index 493e7c1b30f116d77914a1f1807d8eeea2712a25..488604c69d99405733713da38dcc8bc3dd3086dd 100644 (file)
@@ -30,7 +30,7 @@ typedef struct {} DIR;
 typedef struct {} RFILE;
 
 /* Python/pythonrun.c
- * resourece leak false positive */
+ * resource leak false positive */
 
 void Py_FatalError(const char *msg) {
     __coverity_panic__();
index 1abdd02cdfa540fa3bc049bb9a8db884ad33e70a..a6963d7d53d4b51c87f7a9688b09453b7d4fee30 100644 (file)
@@ -194,7 +194,7 @@ the concrete API.
 Here are some ways to address this challenge:
 
 1. Change the relevant usage of the concrete API in CPython and add
-   PyDict_CheckExact() calls to each of the concrete API funcions.
+   PyDict_CheckExact() calls to each of the concrete API functions.
 2. Adjust the relevant concrete API functions to explicitly accommodate
    OrderedDict.
 3. As with #1, add the checks, but improve the abstract API with smart fast
index 8c5c77e48e3ab8905ba79186be7ff62bbdfd98f8..9f57a7e637b84bc5743fa8ba1d0295a757272002 100644 (file)
@@ -1494,7 +1494,7 @@ call_maybe(PyObject *o, _Py_Identifier *nameid, char *format, ...)
 
     The next three properties are the 3 constraints in "C3".
 
-    Local precendece order.
+    Local precedence order.
     If A precedes B in C's MRO, then A will precede B in the MRO of all
     subclasses of C.
 
index 7743c31c1fbdf7a35b6feb0457faba13316ab197..6da33f73a0fcb350d1fcb237dff7bad0c73322ab 100644 (file)
@@ -2810,7 +2810,7 @@ ast_for_expr_stmt(struct compiling *c, const node *n)
        testlist_star_expr: (test|star_expr) (',' test|star_expr)* [',']
        augassign: '+=' | '-=' | '*=' | '@=' | '/=' | '%=' | '&=' | '|=' | '^='
                 | '<<=' | '>>=' | '**=' | '//='
-       test: ... here starts the operator precendence dance
+       test: ... here starts the operator precedence dance
      */
 
     if (NCH(n) == 1) {
index 3c6c14c8362e0110aed8ed5b32fe308145d482e5..da4243887df60929a4df9726079d59fa27c4ed2b 100755 (executable)
@@ -475,7 +475,7 @@ class TokenEater:
                             '# File: %(filename)s, line: %(lineno)d') % d, file=fp)
                 elif options.locationstyle == options.GNU:
                     # fit as many locations on one line, as long as the
-                    # resulting line length doesn't exceeds 'options.width'
+                    # resulting line length doesn't exceed 'options.width'
                     locline = '#:'
                     for filename, lineno in v:
                         d = {'filename': filename, 'lineno': lineno}