]> granicus.if.org Git - python/commitdiff
Issue #27171: Fix typos in documentation, code comments, and tests
authorMartin Panter <vadmium+py@gmail.com>
Thu, 2 Jun 2016 10:35:44 +0000 (10:35 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Thu, 2 Jun 2016 10:35:44 +0000 (10:35 +0000)
25 files changed:
Demo/tkinter/ttk/ttkcalendar.py
Include/pymacconfig.h
Lib/Cookie.py
Lib/_osx_support.py
Lib/_pyio.py
Lib/bsddb/test/test_all.py
Lib/decimal.py
Lib/distutils/tests/test_build_ext.py
Lib/hotshot/__init__.py
Lib/idlelib/AutoComplete.py
Lib/idlelib/MultiCall.py
Lib/idlelib/rpc.py
Lib/locale.py
Lib/pdb.doc
Lib/plat-mac/bgenlocations.py
Lib/test/test_socket.py
Lib/test/test_sys_setprofile.py
Misc/HISTORY
Misc/NEWS
Modules/_bsddb.c
Modules/ld_so_aix.in
Modules/readline.c
Objects/fileobject.c
Tools/bgen/bgen/bgenVariable.py
setup.py

index faa45c5b67250066d56f548508c3c1c4481bf9f0..f163170bacaa7afc3f9b921855a1d81366358c7d 100644 (file)
@@ -191,7 +191,7 @@ class Calendar(ttk.Frame):
 
         self._date = self._date - self.timedelta(days=1)
         self._date = self.datetime(self._date.year, self._date.month, 1)
-        self._build_calendar() # reconstuct calendar
+        self._build_calendar() # reconstruct calendar
 
     def _next_month(self):
         """Update calendar to show the next month."""
index 24e7b8dac61ce52c5e248f01d363bb928e243f73..0c28f5c06d1fed0f27f895fd474c1ff41858f950 100644 (file)
@@ -66,7 +66,7 @@
       * Therefore surpress the toolbox-glue in 64-bit mode.
       */
 
-    /* In 64-bit mode setpgrp always has no argments, in 32-bit
+    /* In 64-bit mode setpgrp always has no arguments, in 32-bit
      * mode that depends on the compilation environment
      */
 #       undef SETPGRP_HAVE_ARG
index b1704d98ccf191f7d9e1f345d1102616dfb4030d..108236371ee333bd59ce4c4e2bce3b8d825e5411 100644 (file)
@@ -190,7 +190,7 @@ as a string.
 Backwards Compatibility
 -----------------------
 
-In order to keep compatibilty with earlier versions of Cookie.py,
+In order to keep compatibility with earlier versions of Cookie.py,
 it is still possible to use Cookie.Cookie() to create a Cookie.  In
 fact, this simply returns a SmartCookie.
 
index 8d3e5d816c662053de033a856e2ae46b07b83069..d2aaae7986a1787a56ec3376fac538e3d0b28a57 100644 (file)
@@ -157,7 +157,7 @@ def _find_appropriate_compiler(_config_vars):
     #    gcc-4.2 is either not present, or a copy of 'llvm-gcc' that
     #    miscompiles Python.
 
-    # skip checks if the compiler was overriden with a CC env variable
+    # skip checks if the compiler was overridden with a CC env variable
     if 'CC' in os.environ:
         return _config_vars
 
@@ -193,7 +193,7 @@ def _find_appropriate_compiler(_config_vars):
     if cc != oldcc:
         # Found a replacement compiler.
         # Modify config vars using new compiler, if not already explicitly
-        # overriden by an env variable, preserving additional arguments.
+        # overridden by an env variable, preserving additional arguments.
         for cv in _COMPILER_CONFIG_VARS:
             if cv in _config_vars and cv not in os.environ:
                 cv_split = _config_vars[cv].split()
@@ -207,7 +207,7 @@ def _remove_universal_flags(_config_vars):
     """Remove all universal build arguments from config vars"""
 
     for cv in _UNIVERSAL_CONFIG_VARS:
-        # Do not alter a config var explicitly overriden by env var
+        # Do not alter a config var explicitly overridden by env var
         if cv in _config_vars and cv not in os.environ:
             flags = _config_vars[cv]
             flags = re.sub('-arch\s+\w+\s', ' ', flags)
@@ -228,7 +228,7 @@ def _remove_unsupported_archs(_config_vars):
     # build extensions on OSX 10.7 and later with the prebuilt
     # 32-bit installer on the python.org website.
 
-    # skip checks if the compiler was overriden with a CC env variable
+    # skip checks if the compiler was overridden with a CC env variable
     if 'CC' in os.environ:
         return _config_vars
 
@@ -244,7 +244,7 @@ def _remove_unsupported_archs(_config_vars):
             # across Xcode and compiler versions, there is no reliable way
             # to be sure why it failed.  Assume here it was due to lack of
             # PPC support and remove the related '-arch' flags from each
-            # config variables not explicitly overriden by an environment
+            # config variables not explicitly overridden by an environment
             # variable.  If the error was for some other reason, we hope the
             # failure will show up again when trying to compile an extension
             # module.
@@ -292,7 +292,7 @@ def _check_for_unavailable_sdk(_config_vars):
         sdk = m.group(1)
         if not os.path.exists(sdk):
             for cv in _UNIVERSAL_CONFIG_VARS:
-                # Do not alter a config var explicitly overriden by env var
+                # Do not alter a config var explicitly overridden by env var
                 if cv in _config_vars and cv not in os.environ:
                     flags = _config_vars[cv]
                     flags = re.sub(r'-isysroot\s+\S+(?:\s|$)', ' ', flags)
index d8e1ee78183dfa7099140ed6adfbce6b468e83a9..ccd6ce8186694b87e8a613326cffe0523f3e621a 100644 (file)
@@ -997,7 +997,7 @@ class BufferedReader(_BufferedIOMixin):
                 break
             avail += len(chunk)
             chunks.append(chunk)
-        # n is more then avail only when an EOF occurred or when
+        # n is more than avail only when an EOF occurred or when
         # read() would have blocked.
         n = min(n, avail)
         out = b"".join(chunks)
index 004e357a72694bbbcb46b892fccb9fad8e2d6989..529dfadcd150f0a423d46caaad7f0075f9f91eea 100644 (file)
@@ -523,7 +523,7 @@ def get_new_database_path() :
     return path
 
 
-# This path can be overriden via "set_test_path_prefix()".
+# This path can be overridden via "set_test_path_prefix()".
 import os, os.path
 get_new_path.prefix=os.path.join(os.environ.get("TMPDIR",
     os.path.join(os.sep,"tmp")), "z-Berkeley_DB")
index 20d9468bf8aa5b9574075978515858fb6ca5e9cb..4797a7d91c12e04919eb7aedf4882e4391fc5068 100644 (file)
@@ -1082,7 +1082,7 @@ class Decimal(object):
     def __pos__(self, context=None):
         """Returns a copy, unless it is a sNaN.
 
-        Rounds the number (if more then precision digits)
+        Rounds the number (if more than precision digits)
         """
         if self._is_special:
             ans = self._check_nans(context=context)
index d380cb6a3d46e15174668293e355768d83c9dbe3..3293c4474ececedfdf6db30b638ae031112d093d 100644 (file)
@@ -251,7 +251,7 @@ class BuildExtTestCase(support.TempdirManager,
 
     def test_compiler_option(self):
         # cmd.compiler is an option and
-        # should not be overriden by a compiler instance
+        # should not be overridden by a compiler instance
         # when the command is run
         dist = Distribution()
         cmd = build_ext(dist)
index 1556ab3f2ba6463fd4e282f9ae493d016d10f5bc..3692f930339a2b08a2c7e3ce0e9a43dc08e6bb7c 100644 (file)
@@ -72,7 +72,7 @@ class Profile:
 
         Additional positional and keyword arguments may be passed
         along; the result of the call is returned, and exceptions are
-        allowed to propogate cleanly, while ensuring that profiling is
+        allowed to propagate cleanly, while ensuring that profiling is
         disabled on the way out.
         """
         return self._prof.runcall(func, args, kw)
index 5a90d424b6a30e6d1864600d16f04f3ce59e25df..9381bdadd15fb7401f00634dedc3f531d418f790 100644 (file)
@@ -1,6 +1,6 @@
 """AutoComplete.py - An IDLE extension for automatically completing names.
 
-This extension can complete either attribute names of file names. It can pop
+This extension can complete either attribute names or file names. It can pop
 a window with all available names, for the user to select from.
 """
 import os
index 31a4fb71afb904589b19d1f66a055946dfa1c4eb..a157d7ad284e4598f94ac242b9200a362d935c28 100644 (file)
@@ -101,7 +101,7 @@ class _SimpleBinder:
             self.widget.unbind(self.widgetinst, self.sequence, self.handlerid)
 
 # An int in range(1 << len(_modifiers)) represents a combination of modifiers
-# (if the least significent bit is on, _modifiers[0] is on, and so on).
+# (if the least significant bit is on, _modifiers[0] is on, and so on).
 # _state_subsets gives for each combination of modifiers, or *state*,
 # a list of the states which are a subset of it. This list is ordered by the
 # number of modifiers is the state - the most specific state comes first.
index 5c4aabd8a87e9aca0f638c0f36b32ce917cb8af9..43328e72184ab21219916b879d16ee3a6a07a704 100644 (file)
@@ -1,4 +1,4 @@
-"""RPC Implemention, originally written for the Python Idle IDE
+"""RPC Implementation, originally written for the Python Idle IDE
 
 For security reasons, GvR requested that Idle's Python execution server process
 connect to the Idle process, which listens for the connection.  Since Idle has
index 3ce758f1b6295782faea98a2327f4c954255ef3c..5aab163e5ae0131caabb52277ef5b19f89e97790 100644 (file)
@@ -16,7 +16,7 @@ import re
 import operator
 import functools
 
-# keep a copy of the builtin str type, because 'str' name is overriden
+# keep a copy of the builtin str type, because 'str' name is overridden
 # in globals by a function below
 _str = str
 
index 375be2f8be23af580d1fea57fd498904741cdb7f..c8c1c93c01ecb790277a5bddedee6d3b5eeb1f92 100644 (file)
@@ -48,7 +48,7 @@ If a file ".pdbrc" exists in your home directory or in the current
 directory, it is read in and executed as if it had been typed at the
 debugger prompt.  This is particularly useful for aliases.  If both
 files exist, the one in the home directory is read first and aliases
-defined there can be overriden by the local file.
+defined there can be overridden by the local file.
 
 Aside from aliases, the debugger is not directly programmable; but it
 is implemented as a class from which you can derive your own debugger
index 38f41592f890ce06bad1822e5e9f254fc43551a9..2f535d2bd031d5f018a0d2a861314b580d948632 100644 (file)
@@ -34,7 +34,7 @@ TOOLBOXDIR="/Users/jack/src/python/Lib/plat-mac/Carbon"
 # Creator for C files:
 CREATOR="CWIE"
 
-# The previous definitions can be overriden by creating a module
+# The previous definitions can be overridden by creating a module
 # bgenlocationscustomize.py and putting it in site-packages (or anywere else
 # on sys.path, actually)
 try:
index 2387029580c8a650fefb86008bcfa0e383cbcca0..fe79b829fd4c388de202c3b78c4c12f5f2fe799c 100644 (file)
@@ -708,7 +708,7 @@ class GeneralModuleTests(unittest.TestCase):
                 pass
 
     def check_sendall_interrupted(self, with_timeout):
-        # socketpair() is not stricly required, but it makes things easier.
+        # socketpair() is not strictly required, but it makes things easier.
         if not hasattr(signal, 'alarm') or not hasattr(socket, 'socketpair'):
             self.skipTest("signal.alarm and socket.socketpair required for this test")
         # Our signal handlers clobber the C errno by calling a math function
@@ -827,7 +827,7 @@ class BasicTCPTest(SocketConnectedTest):
         self.serv_conn.sendall(big_chunk)
 
     @unittest.skipUnless(hasattr(socket, 'fromfd'),
-                         'socket.fromfd not availble')
+                         'socket.fromfd not available')
     def testFromFd(self):
         # Testing fromfd()
         fd = self.cli_conn.fileno()
index e82559f8fc37ae0153b3bd42d3a65409729846b1..18b013d9106b1fb2c7822e76db3a59b3585348ce 100644 (file)
@@ -165,7 +165,7 @@ class ProfileHookTestCase(TestCaseBase):
                               (1, 'return', g_ident),
                               ])
 
-    def test_exception_propogation(self):
+    def test_exception_propagation(self):
         def f(p):
             1./0
         def g(p):
index b8a45761efd16ca25a6310892373157c9a87091f..fa0c6236e036b4e4ce82ea40e67e3939d6172457 100644 (file)
@@ -10009,7 +10009,7 @@ Fri Mar 26 22:36:00 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
 
        * Tools/scripts/dutree.py:
        During display, if EPIPE is raised, it's probably because a pager was
-       killed.  Discard the error in that case, but propogate it otherwise.
+       killed.  Discard the error in that case, but propagate it otherwise.
 
 Fri Mar 26 16:20:45 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
 
index 1fed4cd5269189f7a31d95fc76bf1a06aa443608..c52b29441181012dd4fe6595bc425f70d676bd41 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -2344,8 +2344,8 @@ Library
   with port None or "0" and flags AI_NUMERICSERV.
 
 - Issue #18080: When building a C extension module on OS X, if the compiler
-  is overriden with the CC environment variable, use the new compiler as
-  the default for linking if LDSHARED is not also overriden.  This restores
+  is overridden with the CC environment variable, use the new compiler as
+  the default for linking if LDSHARED is not also overridden.  This restores
   Distutils behavior introduced in 2.7.3 and inadvertently dropped in 2.7.4.
 
 - Issue #18071: C extension module builds on OS X could fail with TypeError
@@ -5467,7 +5467,7 @@ Extension Modules
 
 - Issue #7900: The getgroups(2) system call on MacOSX behaves rather oddly
   compared to other unix systems. In particular, os.getgroups() does
-  not reflect any changes made using os.setgroups() but basicly always
+  not reflect any changes made using os.setgroups() but basically always
   returns the same information as the id command.
 
   os.getgroups() can now return more than 16 groups on MacOSX.
@@ -8076,7 +8076,7 @@ Library
   backported to help facilitate transitions from 2.7 to 3.1.
 
 - Issue #1885: distutils: When running sdist with --formats=tar,gztar the tar
-  file was overriden by the gztar one.
+  file was overridden by the gztar one.
 
 - Issue #4863: distutils.mwerkscompiler has been removed.
 
@@ -8365,7 +8365,7 @@ Build
   installed.
 
 - Issue #5809: Specifying both --enable-framework and --enable-shared is an
-  error. Configure now explicity tells you about this.
+  error. Configure now explicitly tells you about this.
 
 - Issue #3585: Add pkg-config support.  It creates a python-2.7.pc file and a
   python.pc symlink in the $(LIBDIR)/pkgconfig directory.  Patch by Clinton Roy.
index a319333b8eaf848f3a95ab27acacd0c51a65fea9..ed17d39f2ebde814cd419659eeede86ef22dbeca 100644 (file)
@@ -3686,7 +3686,7 @@ _DB_has_key(DBObject* self, PyObject* keyobj, PyObject* txnobj)
     /*
     ** DB_BUFFER_SMALL is only used if we use "get".
     ** We can drop it when we only use "exists",
-    ** when we drop suport for Berkeley DB < 4.6.
+    ** when we drop support for Berkeley DB < 4.6.
     */
     if (err == DB_BUFFER_SMALL || err == 0) {
         Py_INCREF(Py_True);
index 39251d2cf5270e6f56ec4e40d5a1c91834680124..c18ff10f24bb4d0c33b9800291c76ad131883c45 100644 (file)
@@ -12,7 +12,7 @@
 #
 #   ARGUMENTS:      Same as for "ld". The following arguments are processed
 #                   or supplied by this script (those marked with an asterisk
-#                   can be overriden from command line):
+#                   can be overridden from command line):
 #
 #                       Argument                     Default value
 #                   (*) -o [OutputFileName]          -o shr.o
@@ -85,7 +85,7 @@ if test ! -n "$*"; then
 fi
 
 # Default import file for Python
-# Can be overriden by providing a -bI: argument.
+# Can be overridden by providing a -bI: argument.
 impfile="./python.exp"
 
 # Parse arguments
@@ -156,7 +156,7 @@ if test -z "$expfile"; then
 fi
 
 # Default entry symbol for Python modules = init[modulename]
-# Can be overriden by providing a -e argument.
+# Can be overridden by providing a -e argument.
 if test -z "$entry"; then
   entry=init`echo $filename | sed "s/module.*//"`
 fi
index e3a5ed14985c1666f81c5a9368dbe7b38fdb2ef9..1600cd3dd91bc407b3d14c6191cdcec867034851 100644 (file)
@@ -960,7 +960,7 @@ setup_readline(void)
 
 #ifndef __APPLE__
     if (!isatty(STDOUT_FILENO)) {
-        /* Issue #19884: stdout is no a terminal. Disable meta modifier
+        /* Issue #19884: stdout is not a terminal. Disable meta modifier
            keys to not write the ANSI sequence "\033[1034h" into stdout. On
            terminals supporting 8 bit characters like TERM=xterm-256color
            (which is now the default Fedora since Fedora 18), the meta key is
index 9ae068cfc59d403b1fa7fc40dc187373f95cf21f..b29da8a5f58408b2f22c37d540b97364cc76ec03 100644 (file)
@@ -835,7 +835,7 @@ file_truncate(PyFileObject *f, PyObject *args)
     if (initialpos == -1)
         goto onioerror;
 
-    /* Set newsize to current postion if newsizeobj NULL, else to the
+    /* Set newsize to current position if newsizeobj NULL, else to the
      * specified value.
      */
     if (newsizeobj != NULL) {
index 0ad24b346f9093e6f798fffbd5da05a18c5227dc..566438abefa68ae7c960502ac9dd7b3e2c760c38 100644 (file)
@@ -20,7 +20,7 @@ class Variable:
 
     """A Variable holds a type, a name, a transfer mode and flags.
 
-    Most of its methods call the correponding type method with the
+    Most of its methods call the corresponding type method with the
     variable name.
     """
 
index 052fff86642a31ba7f4ca19a9021c8fe7edc2074..aa08ada37af3d923ad6b909c96bafd7d29c64e79 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -770,7 +770,7 @@ class PyBuildExt(build_ext):
                 # In every directory on the search path search for a dynamic
                 # library and then a static library, instead of first looking
                 # for dynamic libraries on the entire path.
-                # This way a staticly linked custom readline gets picked up
+                # This way a statically linked custom readline gets picked up
                 # before the (possibly broken) dynamic library in /usr/lib.
                 readline_extra_link_args = ('-Wl,-search_paths_first',)
             else:
@@ -1767,7 +1767,7 @@ class PyBuildExt(build_ext):
         #     --with-tcltk-libs="-L/path/to/tcllibs -ltclm.n \
         #                        -L/path/to/tklibs -ltkm.n"
         #
-        # These values can also be specified or overriden via make:
+        # These values can also be specified or overridden via make:
         #    make TCLTK_INCLUDES="..." TCLTK_LIBS="..."
         #
         # This can be useful for building and testing tkinter with multiple