]> granicus.if.org Git - python/commitdiff
Spelling and grammar fixes in code comments and documentation
authorMartin Panter <vadmium+py@gmail.com>
Thu, 28 Jul 2016 02:37:04 +0000 (02:37 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Thu, 28 Jul 2016 02:37:04 +0000 (02:37 +0000)
Include/unicodeobject.h
Lib/lib-tk/ttk.py
Lib/test/test_docxmlrpc.py
Lib/test/test_socket.py
Misc/HISTORY
Misc/NEWS
Objects/stringobject.c
Objects/typeobject.c
Parser/asdl_c.py
Python/ast.c
Tools/i18n/pygettext.py

index 9184eb100b47f062c40c3457f00a8892bf189d57..9ac73d46fbcf625bfb94265e8fb6d75eb1023b7e 100644 (file)
@@ -1138,7 +1138,7 @@ PyAPI_FUNC(int) PyUnicode_EncodeDecimal(
 
    These are capable of handling Unicode objects and strings on input
    (we refer to them as strings in the descriptions) and return
-   Unicode objects or integers as apporpriate. */
+   Unicode objects or integers as appropriate. */
 
 /* Concat two strings giving a new Unicode string. */
 
@@ -1288,7 +1288,7 @@ PyAPI_FUNC(int) PyUnicode_Compare(
 /* Rich compare two strings and return one of the following:
 
    - NULL in case an exception was raised
-   - Py_True or Py_False for successfuly 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 3f6f79b91af81194f332c9e19f2cead378c3875f..11254391c0f5f21a932c15b4fe67a3cb3598f4c8 100644 (file)
@@ -153,7 +153,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 a1a1fcf8bc426574990d5311cb50b59605fb1a31..815b6806d03eec0db43721a8ed6eb336d9294c48 100644 (file)
@@ -153,7 +153,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 d784aeade8a8825cea05fe0974c40468f64112d3..765d7c0c1e62e5d28be1cfaed11d10b52b1d1767 100644 (file)
@@ -299,7 +299,7 @@ class GeneralModuleTests(unittest.TestCase):
                               "Error raising socket exception.")
 
     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 73efb3e7a06b582f965ce1e7ae054e739a95b56e..a2f58413b0f392d6fca23a9e675814c8878d5f68 100644 (file)
@@ -13058,7 +13058,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 8378cfba9e7a42ceafa9dae68f477c065a701ccf..0aa7ee87c45ea02817b69ab6f5c0b64212682c22 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -3506,7 +3506,7 @@ Library
 - Issue #14157: Fix time.strptime failing without a year on February 29th.
   Patch by Hynek Schlawack.
 
-- 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 #13183: Fix pdb skipping frames after hitting a breakpoint and running
   step.  Patch by Xavier de Gaye.
index 342b2dbded28182ce10b3ddfe68fde5fc17f79cf..4e5d917a68dcaab30ee00e21a8da95e1c1fc45d6 100644 (file)
@@ -901,7 +901,7 @@ string_print(PyStringObject *op, FILE *fp, int flags)
     fputc(quote, fp);
     for (i = 0; i < str_len; i++) {
         /* Since strings are immutable and the caller should have a
-        reference, accessing the interal buffer should not be an issue
+        reference, accessing the internal buffer should not be an issue
         with the GIL released. */
         c = op->ob_sval[i];
         if (c == quote || c == '\\')
index 438c70b45a15ed1061ae8ae1bc74e279d7970da7..ee0921ac00ad6fafe61f4f16f1dd12a23b35d445 100644 (file)
@@ -1379,7 +1379,7 @@ classic_mro(PyObject *cls)
 
     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 7ebc2369e38bc52d116ad829b086479cedf8ca6f..3d46220300e303f95d58380bd0960495fa3be148 100755 (executable)
@@ -136,7 +136,7 @@ class TypeDefVisitor(EmitVisitor):
 
 
 class StructVisitor(EmitVisitor):
-    """Visitor to generate typdefs for AST."""
+    """Visitor to generate typedefs for AST."""
 
     def visitModule(self, mod):
         for dfn in mod.dfns:
index e5d7ac6600cc0d47e368d15a027415921770259f..2b7aed808bf32ebd5a11eb66ff60ee0ad287e024 100644 (file)
@@ -2179,7 +2179,7 @@ ast_for_expr_stmt(struct compiling *c, const node *n)
        testlist: test (',' test)* [',']
        augassign: '+=' | '-=' | '*=' | '/=' | '%=' | '&=' | '|=' | '^='
                 | '<<=' | '>>=' | '**=' | '//='
-       test: ... here starts the operator precendence dance
+       test: ... here starts the operator precedence dance
      */
 
     if (NCH(n) == 1) {
index af24b471a98c3b048ee88eda7f29df74447a589a..a62d2fe441f8bf8116a08da390c71c79a7710fad 100755 (executable)
@@ -482,7 +482,7 @@ class TokenEater:
                             '# File: %(filename)s, line: %(lineno)d') % d
                 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}