[Python-checkins] cpython (2.7): #18705: fix a number of typos. Patch by Févry Thibault.

ezio.melotti python-checkins at python.org
Sat Aug 17 14:54:30 CEST 2013


http://hg.python.org/cpython/rev/d234dd21374a
changeset:   85220:d234dd21374a
branch:      2.7
parent:      85215:aea67c35e3ce
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Sat Aug 17 15:43:51 2013 +0300
summary:
  #18705: fix a number of typos.  Patch by Févry Thibault.

files:
  Lib/Cookie.py                  |  2 +-
  Lib/_osx_support.py            |  8 ++++----
  Lib/_strptime.py               |  2 +-
  Lib/aifc.py                    |  2 +-
  Lib/calendar.py                |  2 +-
  Lib/compiler/pyassem.py        |  2 +-
  Lib/difflib.py                 |  6 +++---
  Lib/doctest.py                 |  4 ++--
  Lib/genericpath.py             |  2 +-
  Lib/inspect.py                 |  2 +-
  Lib/lib-tk/turtle.py           |  8 ++++----
  Lib/modulefinder.py            |  2 +-
  Lib/multiprocessing/forking.py |  2 +-
  Lib/optparse.py                |  2 +-
  Lib/pdb.py                     |  2 +-
  Lib/pickletools.py             |  4 ++--
  Lib/platform.py                |  6 +++---
  Lib/poplib.py                  |  2 +-
  Lib/rlcompleter.py             |  2 +-
  Lib/subprocess.py              |  2 +-
  Lib/tarfile.py                 |  2 +-
  Misc/ACKS                      |  1 +
  22 files changed, 34 insertions(+), 33 deletions(-)


diff --git a/Lib/Cookie.py b/Lib/Cookie.py
--- a/Lib/Cookie.py
+++ b/Lib/Cookie.py
@@ -238,7 +238,7 @@
 # a two-way quoting algorithm.  Any non-text character is translated
 # into a 4 character sequence: a forward-slash followed by the
 # three-digit octal equivalent of the character.  Any '\' or '"' is
-# quoted with a preceeding '\' slash.
+# quoted with a preceding '\' slash.
 #
 # These are taken from RFC2068 and RFC2109.
 #       _LegalChars       is the list of chars which don't require "'s
diff --git a/Lib/_osx_support.py b/Lib/_osx_support.py
--- a/Lib/_osx_support.py
+++ b/Lib/_osx_support.py
@@ -152,7 +152,7 @@
     #    are not installed.
     #
     #    Futhermore, the compiler that can be used varies between
-    #    Xcode releases. Upto Xcode 4 it was possible to use 'gcc-4.2'
+    #    Xcode releases. Up to Xcode 4 it was possible to use 'gcc-4.2'
     #    as the compiler, after that 'clang' should be used because
     #    gcc-4.2 is either not present, or a copy of 'llvm-gcc' that
     #    miscompiles Python.
@@ -192,7 +192,7 @@
 
     if cc != oldcc:
         # Found a replacement compiler.
-        # Modify config vars using new compiler, if not already explictly
+        # Modify config vars using new compiler, if not already explicitly
         # overriden by an env variable, preserving additional arguments.
         for cv in _COMPILER_CONFIG_VARS:
             if cv in _config_vars and cv not in os.environ:
@@ -274,7 +274,7 @@
     # compile an extension using an SDK that is not present
     # on the current machine it is better to not use an SDK
     # than to fail.  This is particularly important with
-    # the standalong Command Line Tools alternative to a
+    # the standalone Command Line Tools alternative to a
     # full-blown Xcode install since the CLT packages do not
     # provide SDKs.  If the SDK is not present, it is assumed
     # that the header files and dev libs have been installed
@@ -378,7 +378,7 @@
     compilers are present, i.e. when installing pure
     Python dists.  Customization of compiler paths
     and detection of unavailable archs is deferred
-    until the first extention module build is
+    until the first extension module build is
     requested (in distutils.sysconfig.customize_compiler).
 
     Currently called from distutils.sysconfig
diff --git a/Lib/_strptime.py b/Lib/_strptime.py
--- a/Lib/_strptime.py
+++ b/Lib/_strptime.py
@@ -222,7 +222,7 @@
         """Convert a list to a regex string for matching a directive.
 
         Want possible matching values to be from longest to shortest.  This
-        prevents the possibility of a match occuring for a value that also
+        prevents the possibility of a match occurring for a value that also
         a substring of a larger value that should have matched (e.g., 'abc'
         matching when 'abcdef' should have been the match).
 
diff --git a/Lib/aifc.py b/Lib/aifc.py
--- a/Lib/aifc.py
+++ b/Lib/aifc.py
@@ -123,7 +123,7 @@
 compression type, and then write audio frames using writeframesraw.
 When all frames have been written, either call writeframes('') or
 close() to patch up the sizes in the header.
-Marks can be added anytime.  If there are any marks, ypu must call
+Marks can be added anytime.  If there are any marks, you must call
 close() after all frames have been written.
 The close() method is called automatically when the class instance
 is destroyed.
diff --git a/Lib/calendar.py b/Lib/calendar.py
--- a/Lib/calendar.py
+++ b/Lib/calendar.py
@@ -220,7 +220,7 @@
     def yeardatescalendar(self, year, width=3):
         """
         Return the data for the specified year ready for formatting. The return
-        value is a list of month rows. Each month row contains upto width months.
+        value is a list of month rows. Each month row contains up to width months.
         Each month contains between 4 and 6 weeks and each week contains 1-7
         days. Days are datetime.date objects.
         """
diff --git a/Lib/compiler/pyassem.py b/Lib/compiler/pyassem.py
--- a/Lib/compiler/pyassem.py
+++ b/Lib/compiler/pyassem.py
@@ -125,7 +125,7 @@
         # Make sure every block appears in dominators, even if no
         # other block must precede it.
         dominators.setdefault(b, set())
-        # preceeding blocks dominate following blocks
+        # preceding blocks dominate following blocks
         for c in b.get_followers():
             while 1:
                 dominators.setdefault(c, set()).add(b)
diff --git a/Lib/difflib.py b/Lib/difflib.py
--- a/Lib/difflib.py
+++ b/Lib/difflib.py
@@ -586,7 +586,7 @@
     def get_grouped_opcodes(self, n=3):
         """ Isolate change clusters by eliminating ranges with no changes.
 
-        Return a generator of groups with upto n lines of context.
+        Return a generator of groups with up to n lines of context.
         Each group is in the same format as returned by get_opcodes().
 
         >>> from pprint import pprint
@@ -1361,7 +1361,7 @@
     linejunk -- passed on to ndiff (see ndiff documentation)
     charjunk -- passed on to ndiff (see ndiff documentation)
 
-    This function returns an interator which returns a tuple:
+    This function returns an iterator which returns a tuple:
     (from line tuple, to line tuple, boolean flag)
 
     from/to line tuple -- (line num, line text)
@@ -1963,7 +1963,7 @@
         self._make_prefix()
 
         # change tabs to spaces before it gets more difficult after we insert
-        # markkup
+        # markup
         fromlines,tolines = self._tab_newline_replace(fromlines,tolines)
 
         # create diffs iterator which generates side by side from/to data
diff --git a/Lib/doctest.py b/Lib/doctest.py
--- a/Lib/doctest.py
+++ b/Lib/doctest.py
@@ -424,7 +424,7 @@
         zero-based, with respect to the beginning of the DocTest.
 
       - indent: The example's indentation in the DocTest string.
-        I.e., the number of space characters that preceed the
+        I.e., the number of space characters that precede the
         example's first prompt.
 
       - options: A dictionary mapping from option flags to True or
@@ -895,7 +895,7 @@
         if '__name__' not in globs:
             globs['__name__'] = '__main__'  # provide a default module name
 
-        # Recursively expore `obj`, extracting DocTests.
+        # Recursively explore `obj`, extracting DocTests.
         tests = []
         self._find(tests, obj, name, module, source_lines, globs, {})
         # Sort the tests by alpha order of names, for consistency in
diff --git a/Lib/genericpath.py b/Lib/genericpath.py
--- a/Lib/genericpath.py
+++ b/Lib/genericpath.py
@@ -22,7 +22,7 @@
 
 
 # This follows symbolic links, so both islink() and isdir() can be true
-# for the same path ono systems that support symlinks
+# for the same path on systems that support symlinks
 def isfile(path):
     """Test whether a path is a regular file"""
     try:
diff --git a/Lib/inspect.py b/Lib/inspect.py
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -165,7 +165,7 @@
     """Return true if the object is a generator.
 
     Generator objects provide these attributes:
-        __iter__        defined to support interation over container
+        __iter__        defined to support iteration over container
         close           raises a new GeneratorExit exception inside the
                         generator to terminate the iteration
         gi_code         code object
diff --git a/Lib/lib-tk/turtle.py b/Lib/lib-tk/turtle.py
--- a/Lib/lib-tk/turtle.py
+++ b/Lib/lib-tk/turtle.py
@@ -1233,7 +1233,7 @@
         self._delayvalue = int(delay)
 
     def _incrementudc(self):
-        """Increment upadate counter."""
+        """Increment update counter."""
         if not TurtleScreen._RUNNING:
             TurtleScreen._RUNNNING = True
             raise Terminator
@@ -2439,7 +2439,7 @@
                 self.screen = TurtleScreen(canvas)
                 RawTurtle.screens.append(self.screen)
         else:
-            raise TurtleGraphicsError("bad cavas argument %s" % canvas)
+            raise TurtleGraphicsError("bad canvas argument %s" % canvas)
 
         screen = self.screen
         TNavigator.__init__(self, screen.mode())
@@ -2684,7 +2684,7 @@
     def shapesize(self, stretch_wid=None, stretch_len=None, outline=None):
         """Set/return turtle's stretchfactors/outline. Set resizemode to "user".
 
-        Optinonal arguments:
+        Optional arguments:
            stretch_wid : positive number
            stretch_len : positive number
            outline  : positive number
@@ -2975,7 +2975,7 @@
 
     def _goto(self, end):
         """Move the pen to the point end, thereby drawing a line
-        if pen is down. All other methodes for turtle movement depend
+        if pen is down. All other methods for turtle movement depend
         on this one.
         """
         ## Version mit undo-stuff
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py
--- a/Lib/modulefinder.py
+++ b/Lib/modulefinder.py
@@ -516,7 +516,7 @@
         # Print modules that may be missing, but then again, maybe not...
         if maybe:
             print
-            print "Submodules thay appear to be missing, but could also be",
+            print "Submodules that appear to be missing, but could also be",
             print "global names in the parent package:"
             for name in maybe:
                 mods = self.badmodules[name].keys()
diff --git a/Lib/multiprocessing/forking.py b/Lib/multiprocessing/forking.py
--- a/Lib/multiprocessing/forking.py
+++ b/Lib/multiprocessing/forking.py
@@ -367,7 +367,7 @@
 
     def main():
         '''
-        Run code specifed by data received over pipe
+        Run code specified by data received over pipe
         '''
         assert is_forking(sys.argv)
 
diff --git a/Lib/optparse.py b/Lib/optparse.py
--- a/Lib/optparse.py
+++ b/Lib/optparse.py
@@ -1471,7 +1471,7 @@
         """_match_long_opt(opt : string) -> string
 
         Determine which long option string 'opt' matches, ie. which one
-        it is an unambiguous abbrevation for.  Raises BadOptionError if
+        it is an unambiguous abbreviation for.  Raises BadOptionError if
         'opt' doesn't unambiguously match any long option string.
         """
         return _match_abbrev(opt, self._long_opt)
diff --git a/Lib/pdb.py b/Lib/pdb.py
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -1095,7 +1095,7 @@
     def help_run(self):
         print """run [args...]
 Restart the debugged python program. If a string is supplied, it is
-splitted with "shlex" and the result is used as the new sys.argv.
+split with "shlex" and the result is used as the new sys.argv.
 History, breakpoints, actions and debugger options are preserved.
 "restart" is an alias for "run"."""
 
diff --git a/Lib/pickletools.py b/Lib/pickletools.py
--- a/Lib/pickletools.py
+++ b/Lib/pickletools.py
@@ -804,7 +804,7 @@
                  obtype=StackObject,
                  doc="""An object representing a contiguous slice of the stack.
 
-                 This is used in conjuction with markobject, to represent all
+                 This is used in conjunction with markobject, to represent all
                  of the stack following the topmost markobject.  For example,
                  the POP_MARK opcode changes the stack from
 
@@ -1929,7 +1929,7 @@
 
     stack = []          # crude emulation of unpickler stack
     if memo is None:
-        memo = {}       # crude emulation of unpicker memo
+        memo = {}       # crude emulation of unpickler memo
     maxproto = -1       # max protocol number seen
     markstack = []      # bytecode positions of MARK opcodes
     indentchunk = ' ' * indentlevel
diff --git a/Lib/platform.py b/Lib/platform.py
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -228,7 +228,7 @@
                 return 'OpenLinux',pkg[1],id
 
     if os.path.isdir('/usr/lib/setup'):
-        # Check for slackware verson tag file (thanks to Greg Andruk)
+        # Check for slackware version tag file (thanks to Greg Andruk)
         verfiles = os.listdir('/usr/lib/setup')
         for n in range(len(verfiles)-1, -1, -1):
             if verfiles[n][:14] != 'slack-version-':
@@ -280,7 +280,7 @@
     if m is not None:
         return tuple(m.groups())
 
-    # Unkown format... take the first two words
+    # Unknown format... take the first two words
     l = string.split(string.strip(firstline))
     if l:
         version = l[0]
@@ -800,7 +800,7 @@
         versioninfo, machine) with versioninfo being a tuple (version,
         dev_stage, non_release_version).
 
-        Entries which cannot be determined are set to the paramter values
+        Entries which cannot be determined are set to the parameter values
         which default to ''. All tuple entries are strings.
     """
 
diff --git a/Lib/poplib.py b/Lib/poplib.py
--- a/Lib/poplib.py
+++ b/Lib/poplib.py
@@ -321,7 +321,7 @@
 
                hostname - the hostname of the pop3 over ssl server
                port - port number
-               keyfile - PEM formatted file that countains your private key
+               keyfile - PEM formatted file that contains your private key
                certfile - PEM formatted certificate chain file
 
             See the methods of the parent class POP3 for more documentation.
diff --git a/Lib/rlcompleter.py b/Lib/rlcompleter.py
--- a/Lib/rlcompleter.py
+++ b/Lib/rlcompleter.py
@@ -116,7 +116,7 @@
         """Compute matches when text contains a dot.
 
         Assuming the text is of the form NAME.NAME....[NAME], and is
-        evaluatable in self.namespace, it will be evaluated and its attributes
+        evaluable in self.namespace, it will be evaluated and its attributes
         (as revealed by dir()) are used as possible completions.  (For class
         instances, class members are also considered.)
 
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -143,7 +143,7 @@
 started to execute, will be re-raised in the parent.  Additionally,
 the exception object will have one extra attribute called
 'child_traceback', which is a string containing traceback information
-from the childs point of view.
+from the child's point of view.
 
 The most common exception raised is OSError.  This occurs, for
 example, when trying to execute a non-existent file.  Applications
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -330,7 +330,7 @@
     """General exception for extract errors."""
     pass
 class ReadError(TarError):
-    """Exception for unreadble tar archives."""
+    """Exception for unreadable tar archives."""
     pass
 class CompressionError(TarError):
     """Exception for unavailable compression methods."""
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1015,6 +1015,7 @@
 Victor Terrón
 Richard M. Tew
 Tobias Thelen
+Févry Thibault
 Lowe Thiderman
 Nicolas M. Thiéry
 James Thomas

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list