[Python-checkins] cpython (2.7): Issue #27626: Spelling fixes in docs, comments and internal names

martin.panter python-checkins at python.org
Thu Jul 28 00:20:03 EDT 2016


https://hg.python.org/cpython/rev/c8c1ea94379a
changeset: 102472:c8c1ea94379a
branch: 2.7
user: Martin Panter <vadmium+py at gmail.com>
date: Thu Jul 28 01:11:04 2016 +0000
summary:
 Issue #27626: Spelling fixes in docs, comments and internal names
Based on patch by Ville Skyttä.
files:
 Demo/tix/samples/Balloon.py | 2 +-
 Demo/tix/samples/BtnBox.py | 2 +-
 Demo/tix/samples/CmpImg.py | 2 +-
 Demo/tix/samples/ComboBox.py | 2 +-
 Demo/tix/samples/Control.py | 2 +-
 Demo/tix/samples/DirList.py | 2 +-
 Demo/tix/samples/DirTree.py | 2 +-
 Demo/tix/samples/NoteBook.py | 2 +-
 Demo/tix/samples/OptMenu.py | 2 +-
 Demo/tix/samples/PanedWin.py | 2 +-
 Demo/tix/samples/PopMenu.py | 2 +-
 Demo/tix/samples/SHList1.py | 2 +-
 Demo/tix/samples/SHList2.py | 2 +-
 Demo/tix/samples/Tree.py | 2 +-
 Demo/turtle/tdemo_I_dontlike_tiltdemo.py | 2 +-
 Doc/howto/sockets.rst | 2 +-
 Include/longobject.h | 2 +-
 Lib/ctypes/test/test_numbers.py | 2 +-
 Lib/ctypes/test/test_structures.py | 2 +-
 Lib/idlelib/CallTipWindow.py | 2 +-
 Lib/idlelib/ParenMatch.py | 2 +-
 Lib/platform.py | 2 +-
 Lib/test/test_cookielib.py | 2 +-
 Lib/test/test_deque.py | 2 +-
 Lib/test/test_structseq.py | 2 +-
 Lib/unittest/case.py | 4 ++--
 Misc/NEWS | 4 ++--
 Misc/cheatsheet | 2 +-
 Modules/_ctypes/_ctypes.c | 2 +-
 Modules/itertoolsmodule.c | 2 +-
 Objects/exceptions.c | 6 +++---
 Objects/longobject.c | 4 ++--
 Tools/freeze/freeze.py | 2 +-
 Tools/scripts/redemo.py | 2 +-
 34 files changed, 39 insertions(+), 39 deletions(-)
diff --git a/Demo/tix/samples/Balloon.py b/Demo/tix/samples/Balloon.py
--- a/Demo/tix/samples/Balloon.py
+++ b/Demo/tix/samples/Balloon.py
@@ -2,7 +2,7 @@
 #
 # $Id$
 #
-# Tix Demostration Program
+# Tix Demonstration Program
 #
 # This sample program is structured in such a way so that it can be
 # executed from the Tix demo program "tixwidgets.py": it must have a
diff --git a/Demo/tix/samples/BtnBox.py b/Demo/tix/samples/BtnBox.py
--- a/Demo/tix/samples/BtnBox.py
+++ b/Demo/tix/samples/BtnBox.py
@@ -2,7 +2,7 @@
 #
 # $Id$
 #
-# Tix Demostration Program
+# Tix Demonstration Program
 #
 # This sample program is structured in such a way so that it can be
 # executed from the Tix demo program "tixwidgets.py": it must have a
diff --git a/Demo/tix/samples/CmpImg.py b/Demo/tix/samples/CmpImg.py
--- a/Demo/tix/samples/CmpImg.py
+++ b/Demo/tix/samples/CmpImg.py
@@ -2,7 +2,7 @@
 #
 # $Id$
 #
-# Tix Demostration Program
+# Tix Demonstration Program
 #
 # This sample program is structured in such a way so that it can be
 # executed from the Tix demo program "tixwidgets.py": it must have a
diff --git a/Demo/tix/samples/ComboBox.py b/Demo/tix/samples/ComboBox.py
--- a/Demo/tix/samples/ComboBox.py
+++ b/Demo/tix/samples/ComboBox.py
@@ -2,7 +2,7 @@
 #
 # $Id$
 #
-# Tix Demostration Program
+# Tix Demonstration Program
 #
 # This sample program is structured in such a way so that it can be
 # executed from the Tix demo program "tixwidgets.py": it must have a
diff --git a/Demo/tix/samples/Control.py b/Demo/tix/samples/Control.py
--- a/Demo/tix/samples/Control.py
+++ b/Demo/tix/samples/Control.py
@@ -2,7 +2,7 @@
 #
 # $Id$
 #
-# Tix Demostration Program
+# Tix Demonstration Program
 #
 # This sample program is structured in such a way so that it can be
 # executed from the Tix demo program "tixwidgets.py": it must have a
diff --git a/Demo/tix/samples/DirList.py b/Demo/tix/samples/DirList.py
--- a/Demo/tix/samples/DirList.py
+++ b/Demo/tix/samples/DirList.py
@@ -2,7 +2,7 @@
 #
 # $Id$
 #
-# Tix Demostration Program
+# Tix Demonstration Program
 #
 # This sample program is structured in such a way so that it can be
 # executed from the Tix demo program "tixwidgets.py": it must have a
diff --git a/Demo/tix/samples/DirTree.py b/Demo/tix/samples/DirTree.py
--- a/Demo/tix/samples/DirTree.py
+++ b/Demo/tix/samples/DirTree.py
@@ -2,7 +2,7 @@
 #
 # $Id$
 #
-# Tix Demostration Program
+# Tix Demonstration Program
 #
 # This sample program is structured in such a way so that it can be
 # executed from the Tix demo program "tixwidgets.py": it must have a
diff --git a/Demo/tix/samples/NoteBook.py b/Demo/tix/samples/NoteBook.py
--- a/Demo/tix/samples/NoteBook.py
+++ b/Demo/tix/samples/NoteBook.py
@@ -2,7 +2,7 @@
 #
 # $Id$
 #
-# Tix Demostration Program
+# Tix Demonstration Program
 #
 # This sample program is structured in such a way so that it can be
 # executed from the Tix demo program "tixwidgets.py": it must have a
diff --git a/Demo/tix/samples/OptMenu.py b/Demo/tix/samples/OptMenu.py
--- a/Demo/tix/samples/OptMenu.py
+++ b/Demo/tix/samples/OptMenu.py
@@ -2,7 +2,7 @@
 #
 # $Id$
 #
-# Tix Demostration Program
+# Tix Demonstration Program
 #
 # This sample program is structured in such a way so that it can be
 # executed from the Tix demo program "tixwidgets.py": it must have a
diff --git a/Demo/tix/samples/PanedWin.py b/Demo/tix/samples/PanedWin.py
--- a/Demo/tix/samples/PanedWin.py
+++ b/Demo/tix/samples/PanedWin.py
@@ -2,7 +2,7 @@
 #
 # $Id$
 #
-# Tix Demostration Program
+# Tix Demonstration Program
 #
 # This sample program is structured in such a way so that it can be
 # executed from the Tix demo program "tixwidgets.py": it must have a
diff --git a/Demo/tix/samples/PopMenu.py b/Demo/tix/samples/PopMenu.py
--- a/Demo/tix/samples/PopMenu.py
+++ b/Demo/tix/samples/PopMenu.py
@@ -2,7 +2,7 @@
 #
 # $Id$
 #
-# Tix Demostration Program
+# Tix Demonstration Program
 #
 # This sample program is structured in such a way so that it can be
 # executed from the Tix demo program "tixwidgets.py": it must have a
diff --git a/Demo/tix/samples/SHList1.py b/Demo/tix/samples/SHList1.py
--- a/Demo/tix/samples/SHList1.py
+++ b/Demo/tix/samples/SHList1.py
@@ -2,7 +2,7 @@
 #
 # $Id$
 #
-# Tix Demostration Program
+# Tix Demonstration Program
 #
 # This sample program is structured in such a way so that it can be
 # executed from the Tix demo program "tixwidgets.py": it must have a
diff --git a/Demo/tix/samples/SHList2.py b/Demo/tix/samples/SHList2.py
--- a/Demo/tix/samples/SHList2.py
+++ b/Demo/tix/samples/SHList2.py
@@ -2,7 +2,7 @@
 #
 # $Id$
 #
-# Tix Demostration Program
+# Tix Demonstration Program
 #
 # This sample program is structured in such a way so that it can be
 # executed from the Tix demo program "tixwidget": it must have a
diff --git a/Demo/tix/samples/Tree.py b/Demo/tix/samples/Tree.py
--- a/Demo/tix/samples/Tree.py
+++ b/Demo/tix/samples/Tree.py
@@ -2,7 +2,7 @@
 #
 # $Id$
 #
-# Tix Demostration Program
+# Tix Demonstration Program
 #
 # This sample program is structured in such a way so that it can be
 # executed from the Tix demo program "tixwidgets.py": it must have a
diff --git a/Demo/turtle/tdemo_I_dontlike_tiltdemo.py b/Demo/turtle/tdemo_I_dontlike_tiltdemo.py
--- a/Demo/turtle/tdemo_I_dontlike_tiltdemo.py
+++ b/Demo/turtle/tdemo_I_dontlike_tiltdemo.py
@@ -3,7 +3,7 @@
 
 tdemo-I_dont_like_tiltdemo.py
 
-Demostrates
+Demonstrates
 (a) use of a tilted ellipse as
 turtle shape
 (b) stamping that shape
diff --git a/Doc/howto/sockets.rst b/Doc/howto/sockets.rst
--- a/Doc/howto/sockets.rst
+++ b/Doc/howto/sockets.rst
@@ -110,7 +110,7 @@
 There's actually 3 general ways in which this loop could work - dispatching a
 thread to handle ``clientsocket``, create a new process to handle
 ``clientsocket``, or restructure this app to use non-blocking sockets, and
-mulitplex between our "server" socket and any active ``clientsocket``\ s using
+multiplex between our "server" socket and any active ``clientsocket``\ s using
 ``select``. More about that later. The important thing to understand now is
 this: this is *all* a "server" socket does. It doesn't send any data. It doesn't
 receive any data. It just produces "client" sockets. Each ``clientsocket`` is
diff --git a/Include/longobject.h b/Include/longobject.h
--- a/Include/longobject.h
+++ b/Include/longobject.h
@@ -110,7 +110,7 @@
 example, if is_signed is 0 and there are more digits in the v than
 fit in n; or if is_signed is 1, v < 0, and n is just 1 bit shy of
 being large enough to hold a sign bit. OverflowError is set in this
- case, but bytes holds the least-signficant n bytes of the true value.
+ case, but bytes holds the least-significant n bytes of the true value.
 */
 PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
 	unsigned char* bytes, size_t n,
diff --git a/Lib/ctypes/test/test_numbers.py b/Lib/ctypes/test/test_numbers.py
--- a/Lib/ctypes/test/test_numbers.py
+++ b/Lib/ctypes/test/test_numbers.py
@@ -76,7 +76,7 @@
 self.assertEqual(t(v).value, truth(v))
 
 def test_typeerror(self):
- # Only numbers are allowed in the contructor,
+ # Only numbers are allowed in the constructor,
 # otherwise TypeError is raised
 for t in signed_types + unsigned_types + float_types:
 self.assertRaises(TypeError, t, "")
diff --git a/Lib/ctypes/test/test_structures.py b/Lib/ctypes/test/test_structures.py
--- a/Lib/ctypes/test/test_structures.py
+++ b/Lib/ctypes/test/test_structures.py
@@ -106,7 +106,7 @@
 self.assertEqual(alignment(XX), alignment(X))
 self.assertEqual(sizeof(XX), calcsize("3s 3s 0s"))
 
- def test_emtpy(self):
+ def test_empty(self):
 # I had problems with these
 #
 # Although these are pathological cases: Empty Structures!
diff --git a/Lib/idlelib/CallTipWindow.py b/Lib/idlelib/CallTipWindow.py
--- a/Lib/idlelib/CallTipWindow.py
+++ b/Lib/idlelib/CallTipWindow.py
@@ -9,7 +9,7 @@
 HIDE_SEQUENCES = ("<Key-Escape>", "<FocusOut>")
 CHECKHIDE_VIRTUAL_EVENT_NAME = "<<calltipwindow-checkhide>>"
 CHECKHIDE_SEQUENCES = ("<KeyRelease>", "<ButtonRelease>")
-CHECKHIDE_TIME = 100 # miliseconds
+CHECKHIDE_TIME = 100 # milliseconds
 
 MARK_RIGHT = "calltipwindowregion_right"
 
diff --git a/Lib/idlelib/ParenMatch.py b/Lib/idlelib/ParenMatch.py
--- a/Lib/idlelib/ParenMatch.py
+++ b/Lib/idlelib/ParenMatch.py
@@ -9,7 +9,7 @@
 from idlelib.configHandler import idleConf
 
 _openers = {')':'(',']':'[','}':'{'}
-CHECK_DELAY = 100 # miliseconds
+CHECK_DELAY = 100 # milliseconds
 
 class ParenMatch:
 """Highlight matching parentheses
diff --git a/Lib/platform.py b/Lib/platform.py
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -63,7 +63,7 @@
 # though
 # 0.5.2 - fixed uname() to return '' instead of 'unknown' in all
 # return values (the system uname command tends to return
-# 'unknown' instead of just leaving the field emtpy)
+# 'unknown' instead of just leaving the field empty)
 # 0.5.1 - included code for slackware dist; added exception handlers
 # to cover up situations where platforms don't have os.popen
 # (e.g. Mac) or fail on socket.gethostname(); fixed libc
diff --git a/Lib/test/test_cookielib.py b/Lib/test/test_cookielib.py
--- a/Lib/test/test_cookielib.py
+++ b/Lib/test/test_cookielib.py
@@ -346,7 +346,7 @@
 ## comma-separated list, it'll be a headache to parse (at least my head
 ## starts hurting every time I think of that code).
 ## - Expires: You'll get all sorts of date formats in the expires,
-## including emtpy expires attributes ("expires="). Be as flexible as you
+## including empty expires attributes ("expires="). Be as flexible as you
 ## can, and certainly don't expect the weekday to be there; if you can't
 ## parse it, just ignore it and pretend it's a session cookie.
 ## - Domain-matching: Netscape uses the 2-dot rule for _all_ domains, not
diff --git a/Lib/test/test_deque.py b/Lib/test/test_deque.py
--- a/Lib/test/test_deque.py
+++ b/Lib/test/test_deque.py
@@ -329,7 +329,7 @@
 d.clear()
 self.assertEqual(len(d), 0)
 self.assertEqual(list(d), [])
- d.clear() # clear an emtpy deque
+ d.clear() # clear an empty deque
 self.assertEqual(list(d), [])
 
 def test_remove(self):
diff --git a/Lib/test/test_structseq.py b/Lib/test/test_structseq.py
--- a/Lib/test/test_structseq.py
+++ b/Lib/test/test_structseq.py
@@ -88,7 +88,7 @@
 class Exc(Exception):
 pass
 
- # Devious code could crash structseqs' contructors
+ # Devious code could crash structseqs' constructors
 class C:
 def __getitem__(self, i):
 raise Exc
diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py
--- a/Lib/unittest/case.py
+++ b/Lib/unittest/case.py
@@ -529,7 +529,7 @@
 between the two objects is more than the given delta.
 
 Note that decimal places (from zero) are usually not the same
- as significant digits (measured from the most signficant digit).
+ as significant digits (measured from the most significant digit).
 
 If the two objects compare equal then they will automatically
 compare almost equal.
@@ -567,7 +567,7 @@
 between the two objects is less than the given delta.
 
 Note that decimal places (from zero) are usually not the same
- as significant digits (measured from the most signficant digit).
+ as significant digits (measured from the most significant digit).
 
 Objects that are equal automatically fail.
 """
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -7975,7 +7975,7 @@
 mailbox.MH.get_message().
 
 - Issue #5585: Add the ability to call an initializer to
- mulitiprocessing.manager so that users can install custom handlers/etc.
+ multiprocessing.manager so that users can install custom handlers/etc.
 
 - Issue #3551: Patch multiprocessing to raise a proper exception if the size of
 the object when writefile is called causes an ERROR_NO_SYSTEM_RESOURCES. Added
@@ -10173,7 +10173,7 @@
 module is:
 from future_builtins import hex, oct
 
-- Issue #1600: Modifed PyOS_ascii_formatd to use at most 2 digit
+- Issue #1600: Modified PyOS_ascii_formatd to use at most 2 digit
 exponents for exponents with absolute value < 100. Follows C99
 standard. This is a change on Windows, which would use 3 digits.
 Also, added 'n' to the formats that PyOS_ascii_formatd understands,
diff --git a/Misc/cheatsheet b/Misc/cheatsheet
--- a/Misc/cheatsheet
+++ b/Misc/cheatsheet
@@ -434,7 +434,7 @@
 defaultVal, and adds k to map with value defaultVal. defaultVal is
 optional. When not provided and k is not in the map, None is returned and
 added to map.
- (6) Raises a KeyError if the dictionary is emtpy.
+ (6) Raises a KeyError if the dictionary is empty.
 (7) While iterating over a dictionary, the values may be updated but
 the keys cannot be changed.
 
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -366,7 +366,7 @@
 
 /*
 PyCStructType_Type - a meta type/class. Creating a new class using this one as
- __metaclass__ will call the contructor StructUnionType_new. It replaces the
+ __metaclass__ will call the constructor StructUnionType_new. It replaces the
 tp_dict member with a new instance of StgDict, and initializes the C
 accessible fields somehow.
 */
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -1747,7 +1747,7 @@
 PyDoc_STRVAR(chain_from_iterable_doc,
 "chain.from_iterable(iterable) --> chain object\n\
 \n\
-Alternate chain() contructor taking a single iterable argument\n\
+Alternate chain() constructor taking a single iterable argument\n\
 that evaluates lazily.");
 
 static PyMethodDef chain_methods[] = {
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -1640,7 +1640,7 @@
 return PyUnicode_FromString("");
 
 /* Get reason and encoding as strings, which they might not be if
- they've been modified after we were contructed. */
+ they've been modified after we were constructed. */
 reason_str = PyObject_Str(uself->reason);
 if (reason_str == NULL)
 goto done;
@@ -1729,7 +1729,7 @@
 return PyUnicode_FromString("");
 
 /* Get reason and encoding as strings, which they might not be if
- they've been modified after we were contructed. */
+ they've been modified after we were constructed. */
 reason_str = PyObject_Str(uself->reason);
 if (reason_str == NULL)
 goto done;
@@ -1830,7 +1830,7 @@
 return PyUnicode_FromString("");
 
 /* Get reason as a string, which it might not be if it's been
- modified after we were contructed. */
+ modified after we were constructed. */
 reason_str = PyObject_Str(uself->reason);
 if (reason_str == NULL)
 goto done;
diff --git a/Objects/longobject.c b/Objects/longobject.c
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -556,10 +556,10 @@
 size_t i;
 const unsigned char* p = pendbyte;
 const int pincr = -incr; /* search MSB to LSB */
- const unsigned char insignficant = is_signed ? 0xff : 0x00;
+ const unsigned char insignificant = is_signed ? 0xff : 0x00;
 
 for (i = 0; i < n; ++i, p += pincr) {
- if (*p != insignficant)
+ if (*p != insignificant)
 break;
 }
 numsignificantbytes = n - i;
diff --git a/Tools/freeze/freeze.py b/Tools/freeze/freeze.py
--- a/Tools/freeze/freeze.py
+++ b/Tools/freeze/freeze.py
@@ -159,7 +159,7 @@
 except getopt.error, msg:
 usage('getopt error: ' + str(msg))
 
- # proces option arguments
+ # process option arguments
 for o, a in opts:
 if o == '-h':
 print __doc__
diff --git a/Tools/scripts/redemo.py b/Tools/scripts/redemo.py
--- a/Tools/scripts/redemo.py
+++ b/Tools/scripts/redemo.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-"""Basic regular expression demostration facility (Perl style syntax)."""
+"""Basic regular expression demonstration facility (Perl style syntax)."""
 
 from Tkinter import *
 import re
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /