summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-03-16 12:34:31 +0200
committerEzio Melotti <ezio.melotti@gmail.com>2011-03-16 12:34:31 +0200
commitc2077b0d9b5bf99768c6f396bf7ae6c41b682465 (patch)
tree8a1dc9e646a99465f4f1c9961012d52ef183e653 /Lib
parent6905de14fef619767693f8bd91996bc7e99ca9fe (diff)
downloadcpython-git-c2077b0d9b5bf99768c6f396bf7ae6c41b682465.tar.gz
#11565: Fix several typos. Patch by Piotr Kasprzyk.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/SimpleXMLRPCServer.py2
-rw-r--r--Lib/csv.py2
-rw-r--r--Lib/ctypes/test/test_arrays.py2
-rw-r--r--Lib/ctypes/test/test_init.py2
-rw-r--r--Lib/ctypes/test/test_numbers.py2
-rw-r--r--Lib/ctypes/test/test_win32.py2
-rw-r--r--Lib/difflib.py2
-rw-r--r--Lib/distutils/cmd.py2
-rw-r--r--Lib/distutils/tests/test_clean.py2
-rw-r--r--Lib/distutils/tests/test_sdist.py2
-rw-r--r--Lib/doctest.py4
-rw-r--r--Lib/email/header.py2
-rw-r--r--Lib/idlelib/FormatParagraph.py2
-rw-r--r--Lib/idlelib/extend.txt2
-rw-r--r--Lib/idlelib/macosxSupport.py4
-rw-r--r--Lib/imaplib.py2
-rw-r--r--Lib/lib-tk/Tix.py8
-rw-r--r--Lib/lib-tk/test/test_ttk/test_functions.py2
-rw-r--r--Lib/lib-tk/ttk.py2
-rw-r--r--Lib/lib-tk/turtle.py12
-rw-r--r--Lib/lib2to3/fixes/fix_metaclass.py2
-rw-r--r--Lib/lib2to3/pgen2/conv.py4
-rw-r--r--Lib/lib2to3/pytree.py4
-rw-r--r--Lib/lib2to3/tests/data/py2_test_grammar.py2
-rw-r--r--Lib/lib2to3/tests/data/py3_test_grammar.py2
-rw-r--r--Lib/ntpath.py2
-rw-r--r--Lib/pickletools.py2
-rwxr-xr-xLib/platform.py2
-rw-r--r--Lib/subprocess.py2
-rw-r--r--Lib/test/pyclbr_input.py2
-rw-r--r--Lib/test/test_builtin.py2
-rw-r--r--Lib/test/test_capi.py2
-rw-r--r--Lib/test/test_datetime.py2
-rw-r--r--Lib/test/test_decimal.py2
-rw-r--r--Lib/test/test_descr.py2
-rw-r--r--Lib/test/test_doctest.py8
-rw-r--r--Lib/test/test_extcall.py2
-rw-r--r--Lib/test/test_float.py4
-rw-r--r--Lib/test/test_grammar.py2
-rw-r--r--Lib/test/test_httpservers.py2
-rw-r--r--Lib/test/test_iterlen.py4
-rw-r--r--Lib/test/test_itertools.py2
-rw-r--r--Lib/test/test_marshal.py2
-rw-r--r--Lib/test/test_math.py2
-rw-r--r--Lib/test/test_memoryio.py2
-rw-r--r--Lib/test/test_mmap.py2
-rw-r--r--Lib/test/test_multiprocessing.py6
-rw-r--r--Lib/test/test_pep277.py4
-rw-r--r--Lib/test/test_pkg.py2
-rw-r--r--Lib/test/test_print.py2
-rw-r--r--Lib/test/test_strptime.py2
-rw-r--r--Lib/test/test_syntax.py2
-rw-r--r--Lib/test/test_threading.py2
-rw-r--r--Lib/test/test_trace.py2
-rw-r--r--Lib/test/test_urllib.py2
-rw-r--r--Lib/test/test_warnings.py2
-rw-r--r--Lib/unittest/test/test_program.py2
-rw-r--r--Lib/xml/dom/minicompat.py2
-rw-r--r--Lib/xml/dom/minidom.py2
59 files changed, 79 insertions, 79 deletions
diff --git a/Lib/SimpleXMLRPCServer.py b/Lib/SimpleXMLRPCServer.py
index b2a561056f..4cdc1544d0 100644
--- a/Lib/SimpleXMLRPCServer.py
+++ b/Lib/SimpleXMLRPCServer.py
@@ -246,7 +246,7 @@ class SimpleXMLRPCDispatcher:
marshalled data. For backwards compatibility, a dispatch
function can be provided as an argument (see comment in
SimpleXMLRPCRequestHandler.do_POST) but overriding the
- existing method through subclassing is the prefered means
+ existing method through subclassing is the preferred means
of changing method dispatch behavior.
"""
diff --git a/Lib/csv.py b/Lib/csv.py
index 1df506230f..984ed7e581 100644
--- a/Lib/csv.py
+++ b/Lib/csv.py
@@ -281,7 +281,7 @@ class Sniffer:
an all or nothing approach, so we allow for small variations in this
number.
1) build a table of the frequency of each character on every line.
- 2) build a table of freqencies of this frequency (meta-frequency?),
+ 2) build a table of frequencies of this frequency (meta-frequency?),
e.g. 'x occurred 5 times in 10 rows, 6 times in 1000 rows,
7 times in 2 rows'
3) use the mode of the meta-frequency to determine the /expected/
diff --git a/Lib/ctypes/test/test_arrays.py b/Lib/ctypes/test/test_arrays.py
index 433a1ffa20..925f8bfedb 100644
--- a/Lib/ctypes/test/test_arrays.py
+++ b/Lib/ctypes/test/test_arrays.py
@@ -37,7 +37,7 @@ class ArrayTestCase(unittest.TestCase):
values = [ia[i] for i in range(len(init))]
self.assertEqual(values, [0] * len(init))
- # Too many in itializers should be caught
+ # Too many initializers should be caught
self.assertRaises(IndexError, int_array, *range(alen*2))
CharArray = ARRAY(c_char, 3)
diff --git a/Lib/ctypes/test/test_init.py b/Lib/ctypes/test/test_init.py
index 953a14551a..82bd1f998c 100644
--- a/Lib/ctypes/test/test_init.py
+++ b/Lib/ctypes/test/test_init.py
@@ -27,7 +27,7 @@ class InitTest(unittest.TestCase):
self.assertEqual((y.x.a, y.x.b), (0, 0))
self.assertEqual(y.x.new_was_called, False)
- # But explicitely creating an X structure calls __new__ and __init__, of course.
+ # But explicitly creating an X structure calls __new__ and __init__, of course.
x = X()
self.assertEqual((x.a, x.b), (9, 12))
self.assertEqual(x.new_was_called, True)
diff --git a/Lib/ctypes/test/test_numbers.py b/Lib/ctypes/test/test_numbers.py
index b5185bfada..2267693ff6 100644
--- a/Lib/ctypes/test/test_numbers.py
+++ b/Lib/ctypes/test/test_numbers.py
@@ -157,7 +157,7 @@ class NumberTestCase(unittest.TestCase):
def test_int_from_address(self):
from array import array
for t in signed_types + unsigned_types:
- # the array module doesn't suppport all format codes
+ # the array module doesn't support all format codes
# (no 'q' or 'Q')
try:
array(t._type_)
diff --git a/Lib/ctypes/test/test_win32.py b/Lib/ctypes/test/test_win32.py
index 5dedd9f1f6..2534a748cd 100644
--- a/Lib/ctypes/test/test_win32.py
+++ b/Lib/ctypes/test/test_win32.py
@@ -17,7 +17,7 @@ if sys.platform == "win32" and sizeof(c_void_p) == sizeof(c_int):
# ValueError: Procedure probably called with not enough arguments (4 bytes missing)
self.assertRaises(ValueError, IsWindow)
- # This one should succeeed...
+ # This one should succeed...
self.assertEqual(0, IsWindow(0))
# ValueError: Procedure probably called with too many arguments (8 bytes in excess)
diff --git a/Lib/difflib.py b/Lib/difflib.py
index e5910bcd55..b1f92d6d46 100644
--- a/Lib/difflib.py
+++ b/Lib/difflib.py
@@ -1714,7 +1714,7 @@ class HtmlDiff(object):
line = line.replace(' ','\0')
# expand tabs into spaces
line = line.expandtabs(self._tabsize)
- # relace spaces from expanded tabs back into tab characters
+ # replace spaces from expanded tabs back into tab characters
# (we'll replace them with markup after we do differencing)
line = line.replace(' ','\t')
return line.replace('\0',' ').rstrip('\n')
diff --git a/Lib/distutils/cmd.py b/Lib/distutils/cmd.py
index dc40c14d61..9ad5657e40 100644
--- a/Lib/distutils/cmd.py
+++ b/Lib/distutils/cmd.py
@@ -377,7 +377,7 @@ class Command:
dry_run=self.dry_run)
def move_file (self, src, dst, level=1):
- """Move a file respectin dry-run flag."""
+ """Move a file respecting dry-run flag."""
return file_util.move_file(src, dst, dry_run = self.dry_run)
def spawn (self, cmd, search_path=1, level=1):
diff --git a/Lib/distutils/tests/test_clean.py b/Lib/distutils/tests/test_clean.py
index 2d1610da7c..7b988f7f32 100644
--- a/Lib/distutils/tests/test_clean.py
+++ b/Lib/distutils/tests/test_clean.py
@@ -39,7 +39,7 @@ class cleanTestCase(support.TempdirManager,
self.assertTrue(not os.path.exists(path),
'%s was not removed' % path)
- # let's run the command again (should spit warnings but suceed)
+ # let's run the command again (should spit warnings but succeed)
cmd.all = 1
cmd.ensure_finalized()
cmd.run()
diff --git a/Lib/distutils/tests/test_sdist.py b/Lib/distutils/tests/test_sdist.py
index ab8c3d917b..54a32b88f5 100644
--- a/Lib/distutils/tests/test_sdist.py
+++ b/Lib/distutils/tests/test_sdist.py
@@ -370,7 +370,7 @@ class SDistTestCase(PyPIRCCommandTestCase):
# adding a file
self.write_file((self.tmp_dir, 'somecode', 'doc2.txt'), '#')
- # make sure build_py is reinitinialized, like a fresh run
+ # make sure build_py is reinitialized, like a fresh run
build_py = dist.get_command_obj('build_py')
build_py.finalized = False
build_py.ensure_finalized()
diff --git a/Lib/doctest.py b/Lib/doctest.py
index 5565aab57f..622f68db7f 100644
--- a/Lib/doctest.py
+++ b/Lib/doctest.py
@@ -1217,7 +1217,7 @@ class DocTestRunner:
# Process each example.
for examplenum, example in enumerate(test.examples):
- # If REPORT_ONLY_FIRST_FAILURE is set, then supress
+ # If REPORT_ONLY_FIRST_FAILURE is set, then suppress
# reporting after the first failure.
quiet = (self.optionflags & REPORT_ONLY_FIRST_FAILURE and
failures > 0)
@@ -2186,7 +2186,7 @@ class DocTestCase(unittest.TestCase):
caller can catch the errors and initiate post-mortem debugging.
The DocTestCase provides a debug method that raises
- UnexpectedException errors if there is an unexepcted
+ UnexpectedException errors if there is an unexpected
exception:
>>> test = DocTestParser().get_doctest('>>> raise KeyError\n42',
diff --git a/Lib/email/header.py b/Lib/email/header.py
index 702adf1587..2cf870fd57 100644
--- a/Lib/email/header.py
+++ b/Lib/email/header.py
@@ -47,7 +47,7 @@ ecre = re.compile(r'''
# For use with .match()
fcre = re.compile(r'[\041-\176]+:$')
-# Find a header embeded in a putative header value. Used to check for
+# Find a header embedded in a putative header value. Used to check for
# header injection attack.
_embeded_header = re.compile(r'\n[^ \t]+:')
diff --git a/Lib/idlelib/FormatParagraph.py b/Lib/idlelib/FormatParagraph.py
index 02f96d493a..6a5f9b5dd5 100644
--- a/Lib/idlelib/FormatParagraph.py
+++ b/Lib/idlelib/FormatParagraph.py
@@ -54,7 +54,7 @@ class FormatParagraph:
# If the block ends in a \n, we dont want the comment
# prefix inserted after it. (Im not sure it makes sense to
# reformat a comment block that isnt made of complete
- # lines, but whatever!) Can't think of a clean soltution,
+ # lines, but whatever!) Can't think of a clean solution,
# so we hack away
block_suffix = ""
if not newdata[-1]:
diff --git a/Lib/idlelib/extend.txt b/Lib/idlelib/extend.txt
index f5fb3e0409..165e044b5d 100644
--- a/Lib/idlelib/extend.txt
+++ b/Lib/idlelib/extend.txt
@@ -18,7 +18,7 @@ window.
An IDLE extension class is instantiated with a single argument,
`editwin', an EditorWindow instance. The extension cannot assume much
-about this argument, but it is guarateed to have the following instance
+about this argument, but it is guaranteed to have the following instance
variables:
text a Text instance (a widget)
diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py
index 722ac54055..4be60a3601 100644
--- a/Lib/idlelib/macosxSupport.py
+++ b/Lib/idlelib/macosxSupport.py
@@ -53,8 +53,8 @@ def tkVersionWarning(root):
def addOpenEventSupport(root, flist):
"""
- This ensures that the application will respont to open AppleEvents, which
- makes is feaseable to use IDLE as the default application for python files.
+ This ensures that the application will respond to open AppleEvents, which
+ makes is feasible to use IDLE as the default application for python files.
"""
def doOpenFile(*args):
for fn in args:
diff --git a/Lib/imaplib.py b/Lib/imaplib.py
index fdae445ae1..5693191185 100644
--- a/Lib/imaplib.py
+++ b/Lib/imaplib.py
@@ -1394,7 +1394,7 @@ def Time2Internaldate(date_time):
"""Convert date_time to IMAP4 INTERNALDATE representation.
Return string in form: '"DD-Mmm-YYYY HH:MM:SS +HHMM"'. The
- date_time argument can be a number (int or float) represening
+ date_time argument can be a number (int or float) representing
seconds since epoch (as returned by time.time()), a 9-tuple
representing local time (as returned by time.localtime()), or a
double-quoted string. In the last case, it is assumed to already
diff --git a/Lib/lib-tk/Tix.py b/Lib/lib-tk/Tix.py
index 48d604453f..210b7d23b7 100644
--- a/Lib/lib-tk/Tix.py
+++ b/Lib/lib-tk/Tix.py
@@ -171,7 +171,7 @@ class tixCommand:
return self.tk.call('tix', 'getimage', name)
def tix_option_get(self, name):
- """Gets the options manitained by the Tix
+ """Gets the options maintained by the Tix
scheme mechanism. Available options include:
active_bg active_fg bg
@@ -576,7 +576,7 @@ class ButtonBox(TixWidget):
class ComboBox(TixWidget):
"""ComboBox - an Entry field with a dropdown menu. The user can select a
- choice by either typing in the entry subwdget or selecting from the
+ choice by either typing in the entry subwidget or selecting from the
listbox subwidget.
Subwidget Class
@@ -869,7 +869,7 @@ class HList(TixWidget, XView, YView):
"""HList - Hierarchy display widget can be used to display any data
that have a hierarchical structure, for example, file system directory
trees. The list entries are indented and connected by branch lines
- according to their places in the hierachy.
+ according to their places in the hierarchy.
Subwidgets - None"""
@@ -1520,7 +1520,7 @@ class TList(TixWidget, XView, YView):
self.tk.call(self._w, 'selection', 'set', first, last)
class Tree(TixWidget):
- """Tree - The tixTree widget can be used to display hierachical
+ """Tree - The tixTree widget can be used to display hierarchical
data in a tree form. The user can adjust
the view of the tree by opening or closing parts of the tree."""
diff --git a/Lib/lib-tk/test/test_ttk/test_functions.py b/Lib/lib-tk/test/test_ttk/test_functions.py
index f8800ce462..9de25a445f 100644
--- a/Lib/lib-tk/test/test_ttk/test_functions.py
+++ b/Lib/lib-tk/test/test_ttk/test_functions.py
@@ -136,7 +136,7 @@ class InternalFunctionsTest(unittest.TestCase):
# minimum acceptable for image type
self.assertEqual(ttk._format_elemcreate('image', False, 'test'),
("test ", ()))
- # specifiyng a state spec
+ # specifying a state spec
self.assertEqual(ttk._format_elemcreate('image', False, 'test',
('', 'a')), ("test {} a", ()))
# state spec with multiple states
diff --git a/Lib/lib-tk/ttk.py b/Lib/lib-tk/ttk.py
index d0762665ff..2fd513a59f 100644
--- a/Lib/lib-tk/ttk.py
+++ b/Lib/lib-tk/ttk.py
@@ -707,7 +707,7 @@ class Combobox(Entry):
textvariable, values, width
"""
# The "values" option may need special formatting, so leave to
- # _format_optdict the responsability to format it
+ # _format_optdict the responsibility to format it
if "values" in kw:
kw["values"] = _format_optdict({'v': kw["values"]})[1]
diff --git a/Lib/lib-tk/turtle.py b/Lib/lib-tk/turtle.py
index 20d6e90dc2..a003433273 100644
--- a/Lib/lib-tk/turtle.py
+++ b/Lib/lib-tk/turtle.py
@@ -1409,7 +1409,7 @@ class TurtleScreen(TurtleScreenBase):
Optional arguments:
canvwidth -- positive integer, new width of canvas in pixels
canvheight -- positive integer, new height of canvas in pixels
- bg -- colorstring or color-tupel, new backgroundcolor
+ bg -- colorstring or color-tuple, new backgroundcolor
If no arguments are given, return current (canvaswidth, canvasheight)
Do not alter the drawing window. To observe hidden parts of
@@ -3079,9 +3079,9 @@ class RawTurtle(TPen, TNavigator):
fill="", width=ps)
# Turtle now at position old,
self._position = old
- ## if undo is done during crating a polygon, the last vertex
- ## will be deleted. if the polygon is entirel deleted,
- ## creatigPoly will be set to False.
+ ## if undo is done during creating a polygon, the last vertex
+ ## will be deleted. if the polygon is entirely deleted,
+ ## creatingPoly will be set to False.
## Polygons created before the last one will not be affected by undo()
if self._creatingPoly:
if len(self._poly) > 0:
@@ -3691,7 +3691,7 @@ class _Screen(TurtleScreen):
class Turtle(RawTurtle):
- """RawTurtle auto-crating (scrolled) canvas.
+ """RawTurtle auto-creating (scrolled) canvas.
When a Turtle object is created or a function derived from some
Turtle method is called a TurtleScreen object is automatically created.
@@ -3731,7 +3731,7 @@ def write_docstringdict(filename="turtle_docstringdict"):
filename -- a string, used as filename
default value is turtle_docstringdict
- Has to be called explicitely, (not used by the turtle-graphics classes)
+ Has to be called explicitly, (not used by the turtle-graphics classes)
The docstring dictionary will be written to the Python script <filname>.py
It is intended to serve as a template for translation of the docstrings
into different languages.
diff --git a/Lib/lib2to3/fixes/fix_metaclass.py b/Lib/lib2to3/fixes/fix_metaclass.py
index f403fd6d53..c86fbeaab2 100644
--- a/Lib/lib2to3/fixes/fix_metaclass.py
+++ b/Lib/lib2to3/fixes/fix_metaclass.py
@@ -48,7 +48,7 @@ def fixup_parse_tree(cls_node):
"""
for node in cls_node.children:
if node.type == syms.suite:
- # already in the prefered format, do nothing
+ # already in the preferred format, do nothing
return
# !%@#! oneliners have no suite node, we have to fake one up
diff --git a/Lib/lib2to3/pgen2/conv.py b/Lib/lib2to3/pgen2/conv.py
index 5d788a1d2b..28fbb0b95f 100644
--- a/Lib/lib2to3/pgen2/conv.py
+++ b/Lib/lib2to3/pgen2/conv.py
@@ -51,7 +51,7 @@ class Converter(grammar.Grammar):
self.finish_off()
def parse_graminit_h(self, filename):
- """Parse the .h file writen by pgen. (Internal)
+ """Parse the .h file written by pgen. (Internal)
This file is a sequence of #define statements defining the
nonterminals of the grammar as numbers. We build two tables
@@ -82,7 +82,7 @@ class Converter(grammar.Grammar):
return True
def parse_graminit_c(self, filename):
- """Parse the .c file writen by pgen. (Internal)
+ """Parse the .c file written by pgen. (Internal)
The file looks as follows. The first two lines are always this:
diff --git a/Lib/lib2to3/pytree.py b/Lib/lib2to3/pytree.py
index c2fa80014a..179caca51f 100644
--- a/Lib/lib2to3/pytree.py
+++ b/Lib/lib2to3/pytree.py
@@ -658,8 +658,8 @@ class WildcardPattern(BasePattern):
content: optional sequence of subsequences of patterns;
if absent, matches one node;
if present, each subsequence is an alternative [*]
- min: optinal minumum number of times to match, default 0
- max: optional maximum number of times tro match, default HUGE
+ min: optional minimum number of times to match, default 0
+ max: optional maximum number of times to match, default HUGE
name: optional name assigned to this match
[*] Thus, if content is [[a, b, c], [d, e], [f, g, h]] this is
diff --git a/Lib/lib2to3/tests/data/py2_test_grammar.py b/Lib/lib2to3/tests/data/py2_test_grammar.py
index 17f9f4c51c..b5a4137d16 100644
--- a/Lib/lib2to3/tests/data/py2_test_grammar.py
+++ b/Lib/lib2to3/tests/data/py2_test_grammar.py
@@ -316,7 +316,7 @@ class GrammarTests(unittest.TestCase):
### simple_stmt: small_stmt (';' small_stmt)* [';']
x = 1; pass; del x
def foo():
- # verify statments that end with semi-colons
+ # verify statements that end with semi-colons
x = 1; pass; del x;
foo()
diff --git a/Lib/lib2to3/tests/data/py3_test_grammar.py b/Lib/lib2to3/tests/data/py3_test_grammar.py
index 977f0b8b35..c0bf7f27aa 100644
--- a/Lib/lib2to3/tests/data/py3_test_grammar.py
+++ b/Lib/lib2to3/tests/data/py3_test_grammar.py
@@ -356,7 +356,7 @@ class GrammarTests(unittest.TestCase):
### simple_stmt: small_stmt (';' small_stmt)* [';']
x = 1; pass; del x
def foo():
- # verify statments that end with semi-colons
+ # verify statements that end with semi-colons
x = 1; pass; del x;
foo()
diff --git a/Lib/ntpath.py b/Lib/ntpath.py
index 14911d0dbe..765e1bff32 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -310,7 +310,7 @@ def expanduser(path):
# - $varname is accepted.
# - %varname% is accepted.
# - varnames can be made out of letters, digits and the characters '_-'
-# (though is not verifed in the ${varname} and %varname% cases)
+# (though is not verified in the ${varname} and %varname% cases)
# XXX With COMMAND.COM you can use any characters in a variable name,
# XXX except '^|<>='.
diff --git a/Lib/pickletools.py b/Lib/pickletools.py
index cfeeecb111..d717728d41 100644
--- a/Lib/pickletools.py
+++ b/Lib/pickletools.py
@@ -1370,7 +1370,7 @@ opcodes = [
proto=0,
doc="""Read an object from the memo and push it on the stack.
- The index of the memo object to push is given by the newline-teriminated
+ The index of the memo object to push is given by the newline-terminated
decimal string following. BINGET and LONG_BINGET are space-optimized
versions.
"""),
diff --git a/Lib/platform.py b/Lib/platform.py
index 0f24553669..3181303394 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -503,7 +503,7 @@ def _syscmd_ver(system='', release='', version='',
info = pipe.read()
if pipe.close():
raise os.error,'command failed'
- # XXX How can I supress shell errors from being written
+ # XXX How can I suppress shell errors from being written
# to stderr ?
except os.error,why:
#print 'Command %s failed: %s' % (cmd,why)
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 2ecde0bb39..c8427d13a4 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -883,7 +883,7 @@ class Popen(object):
except pywintypes.error, e:
# Translate pywintypes.error to WindowsError, which is
# a subclass of OSError. FIXME: We should really
- # translate errno using _sys_errlist (or simliar), but
+ # translate errno using _sys_errlist (or similar), but
# how can this be done from Python?
raise WindowsError(*e.args)
finally:
diff --git a/Lib/test/pyclbr_input.py b/Lib/test/pyclbr_input.py
index 8efc9de75d..19ccd62dea 100644
--- a/Lib/test/pyclbr_input.py
+++ b/Lib/test/pyclbr_input.py
@@ -19,7 +19,7 @@ class C (B):
# XXX: This causes test_pyclbr.py to fail, but only because the
# introspection-based is_method() code in the test can't
- # distinguish between this and a geniune method function like m().
+ # distinguish between this and a genuine method function like m().
# The pyclbr.py module gets this right as it parses the text.
#
#f = f
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py
index d8fb2d5450..1d35a6afe5 100644
--- a/Lib/test/test_builtin.py
+++ b/Lib/test/test_builtin.py
@@ -693,7 +693,7 @@ class BuiltinTest(unittest.TestCase):
# provide too much opportunity for insane things to happen.
# We don't want them in the interned dict and if they aren't
# actually interned, we don't want to create the appearance
- # that they are by allowing intern() to succeeed.
+ # that they are by allowing intern() to succeed.
class S(str):
def __hash__(self):
return 123
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index 7c25923180..7dec2de655 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -86,7 +86,7 @@ class TestPendingCalls(unittest.TestCase):
context.event.set()
def test_pendingcalls_non_threaded(self):
- #again, just using the main thread, likely they will all be dispathced at
+ #again, just using the main thread, likely they will all be dispatched at
#once. It is ok to ask for too many, because we loop until we find a slot.
#the loop can be interrupted to dispatch.
#there are only 32 dispatch slots, so we go for twice that!
diff --git a/Lib/test/test_datetime.py b/Lib/test/test_datetime.py
index 15188dbc71..1a86353076 100644
--- a/Lib/test/test_datetime.py
+++ b/Lib/test/test_datetime.py
@@ -3108,7 +3108,7 @@ class TestTimezoneConversions(unittest.TestCase):
self.assertEqual(dt, there_and_back)
# Because we have a redundant spelling when DST begins, there is
- # (unforunately) an hour when DST ends that can't be spelled at all in
+ # (unfortunately) an hour when DST ends that can't be spelled at all in
# local time. When DST ends, the clock jumps from 1:59 back to 1:00
# again. The hour 1:MM DST has no spelling then: 1:MM is taken to be
# standard time. 1:MM DST == 0:MM EST, but 0:MM is taken to be
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
index dc217779ee..a011b2f76d 100644
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -231,7 +231,7 @@ class DecimalTest(unittest.TestCase):
try:
t = self.eval_line(line)
except DecimalException as exception:
- #Exception raised where there shoudn't have been one.
+ #Exception raised where there shouldn't have been one.
self.fail('Exception "'+exception.__class__.__name__ + '" raised on line '+line)
return
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 7d8564180f..b5e86fb778 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -4282,7 +4282,7 @@ order (MRO) for bases """
except TypeError:
pass
else:
- self.fail("Carlo Verre __setattr__ suceeded!")
+ self.fail("Carlo Verre __setattr__ succeeded!")
try:
object.__delattr__(str, "lower")
except TypeError:
diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py
index c027acdcd6..df33e7003b 100644
--- a/Lib/test/test_doctest.py
+++ b/Lib/test/test_doctest.py
@@ -1292,7 +1292,7 @@ marking, as well as interline differences.
? + ++ ^
TestResults(failed=1, attempted=1)
-The REPORT_ONLY_FIRST_FAILURE supresses result output after the first
+The REPORT_ONLY_FIRST_FAILURE suppresses result output after the first
failing example:
>>> def f(x):
@@ -1322,7 +1322,7 @@ failing example:
2
TestResults(failed=3, attempted=5)
-However, output from `report_start` is not supressed:
+However, output from `report_start` is not suppressed:
>>> doctest.DocTestRunner(verbose=True, optionflags=flags).run(test)
... # doctest: +ELLIPSIS
@@ -2334,7 +2334,7 @@ optional `module_relative` parameter:
TestResults(failed=0, attempted=2)
>>> doctest.master = None # Reset master.
-Verbosity can be increased with the optional `verbose` paremter:
+Verbosity can be increased with the optional `verbose` parameter:
>>> doctest.testfile('test_doctest.txt', globs=globs, verbose=True)
Trying:
@@ -2371,7 +2371,7 @@ parameter:
TestResults(failed=1, attempted=2)
>>> doctest.master = None # Reset master.
-The summary report may be supressed with the optional `report`
+The summary report may be suppressed with the optional `report`
parameter:
>>> doctest.testfile('test_doctest.txt', report=False)
diff --git a/Lib/test/test_extcall.py b/Lib/test/test_extcall.py
index 950ac28e72..80e09a0ec2 100644
--- a/Lib/test/test_extcall.py
+++ b/Lib/test/test_extcall.py
@@ -236,7 +236,7 @@ first argument (got int instance instead)
TypeError: unbound method method() must be called with Foo instance as \
first argument (got int instance instead)
-A PyCFunction that takes only positional parameters shoud allow an
+A PyCFunction that takes only positional parameters should allow an
empty keyword dictionary to pass without a complaint, but raise a
TypeError if te dictionary is not empty
diff --git a/Lib/test/test_float.py b/Lib/test/test_float.py
index e16be06760..d9cac74c4f 100644
--- a/Lib/test/test_float.py
+++ b/Lib/test/test_float.py
@@ -56,7 +56,7 @@ class GeneralFloatCases(unittest.TestCase):
def test_float_with_comma(self):
# set locale to something that doesn't use '.' for the decimal point
# float must not accept the locale specific decimal point but
- # it still has to accept the normal python syntac
+ # it still has to accept the normal python syntax
import locale
if not locale.localeconv()['decimal_point'] == ',':
return
@@ -158,7 +158,7 @@ class GeneralFloatCases(unittest.TestCase):
def assertEqualAndEqualSign(self, a, b):
# fail unless a == b and a and b have the same sign bit;
# the only difference from assertEqual is that this test
- # distingishes -0.0 and 0.0.
+ # distinguishes -0.0 and 0.0.
self.assertEqual((a, copysign(1.0, a)), (b, copysign(1.0, b)))
@requires_IEEE_754
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py
index 084f590bb2..137ac233fc 100644
--- a/Lib/test/test_grammar.py
+++ b/Lib/test/test_grammar.py
@@ -314,7 +314,7 @@ class GrammarTests(unittest.TestCase):
### simple_stmt: small_stmt (';' small_stmt)* [';']
x = 1; pass; del x
def foo():
- # verify statments that end with semi-colons
+ # verify statements that end with semi-colons
x = 1; pass; del x;
foo()
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py
index cc9b93c392..3de0923efe 100644
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -87,7 +87,7 @@ class BaseTestCase(unittest.TestCase):
return self.connection.getresponse()
class BaseHTTPRequestHandlerTestCase(unittest.TestCase):
- """Test the functionaility of the BaseHTTPServer focussing on
+ """Test the functionality of the BaseHTTPServer focussing on
BaseHTTPRequestHandler.
"""
diff --git a/Lib/test/test_iterlen.py b/Lib/test/test_iterlen.py
index ab5466ecf9..88f43c7ffb 100644
--- a/Lib/test/test_iterlen.py
+++ b/Lib/test/test_iterlen.py
@@ -20,11 +20,11 @@ This is the case for tuples, xrange objects, and itertools.repeat().
Some containers become temporarily immutable during iteration. This includes
dicts, sets, and collections.deque. Their implementation is equally simple
-though they need to permantently set their length to zero whenever there is
+though they need to permanently set their length to zero whenever there is
an attempt to iterate after a length mutation.
The situation slightly more involved whenever an object allows length mutation
-during iteration. Lists and sequence iterators are dynanamically updatable.
+during iteration. Lists and sequence iterators are dynamically updatable.
So, if a list is extended during iteration, the iterator will continue through
the new items. If it shrinks to a point before the most recent iteration,
then no further items are available and the length is reported at zero.
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py
index e416755983..97feb7b789 100644
--- a/Lib/test/test_itertools.py
+++ b/Lib/test/test_itertools.py
@@ -1475,7 +1475,7 @@ Samuele
... return chain(iterable, repeat(None))
>>> def ncycles(iterable, n):
-... "Returns the seqeuence elements n times"
+... "Returns the sequence elements n times"
... return chain(*repeat(iterable, n))
>>> def dotproduct(vec1, vec2):
diff --git a/Lib/test/test_marshal.py b/Lib/test/test_marshal.py
index 10a5161462..744f93c7af 100644
--- a/Lib/test/test_marshal.py
+++ b/Lib/test/test_marshal.py
@@ -252,7 +252,7 @@ class BugsTestCase(unittest.TestCase):
# >>> type(loads(dumps(Int())))
# <type 'int'>
for typ in (int, long, float, complex, tuple, list, dict, set, frozenset):
- # Note: str and unicode sublclasses are not tested because they get handled
+ # Note: str and unicode subclasses are not tested because they get handled
# by marshal's routines for objects supporting the buffer API.
subtyp = type('subtyp', (typ,), {})
self.assertRaises(ValueError, marshal.dumps, subtyp())
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py
index 973d1abbdb..ac4475e2e5 100644
--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -780,7 +780,7 @@ class MathTests(unittest.TestCase):
# the following tests have been commented out since they don't
# really belong here: the implementation of ** for floats is
- # independent of the implemention of math.pow
+ # independent of the implementation of math.pow
#self.assertEqual(1**NAN, 1)
#self.assertEqual(1**INF, 1)
#self.assertEqual(1**NINF, 1)
diff --git a/Lib/test/test_memoryio.py b/Lib/test/test_memoryio.py
index c494759abc..68657aaf4b 100644
--- a/Lib/test/test_memoryio.py
+++ b/Lib/test/test_memoryio.py
@@ -372,7 +372,7 @@ class MemoryTestMixin:
# Pickle expects the class to be on the module level. Here we use a
# little hack to allow the PickleTestMemIO class to derive from
- # self.ioclass without having to define all combinations explictly on
+ # self.ioclass without having to define all combinations explicitly on
# the module-level.
import __main__
PickleTestMemIO.__module__ = '__main__'
diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py
index bc990549ec..62c6983a69 100644
--- a/Lib/test/test_mmap.py
+++ b/Lib/test/test_mmap.py
@@ -590,7 +590,7 @@ class MmapTests(unittest.TestCase):
m2.close()
m1.close()
- # Test differnt tag
+ # Test different tag
m1 = mmap.mmap(-1, len(data1), tagname="foo")
m1[:] = data1
m2 = mmap.mmap(-1, len(data2), tagname="boo")
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
index 78b002ef57..c30246085b 100644
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -18,7 +18,7 @@ import logging
from test import test_support
from StringIO import StringIO
_multiprocessing = test_support.import_module('_multiprocessing')
-# import threading after _multiprocessing to raise a more revelant error
+# import threading after _multiprocessing to raise a more relevant error
# message: "No module named _multiprocessing". _multiprocessing is not compiled
# without thread support.
import threading
@@ -780,7 +780,7 @@ class _TestEvent(BaseTestCase):
event = self.Event()
wait = TimingWrapper(event.wait)
- # Removed temporaily, due to API shear, this does not
+ # Removed temporarily, due to API shear, this does not
# work with threading._Event objects. is_set == isSet
self.assertEqual(event.is_set(), False)
@@ -1705,7 +1705,7 @@ class _TestFinalize(BaseTestCase):
util.Finalize(None, conn.send, args=('STOP',), exitpriority=-100)
- # call mutliprocessing's cleanup function then exit process without
+ # call multiprocessing's cleanup function then exit process without
# garbage collecting locals
util._exit_function()
conn.close()
diff --git a/Lib/test/test_pep277.py b/Lib/test/test_pep277.py
index 6c8a25f427..92b82d0f7d 100644
--- a/Lib/test/test_pep277.py
+++ b/Lib/test/test_pep277.py
@@ -126,7 +126,7 @@ class UnicodeFileTests(unittest.TestCase):
# NFD (a variant of Unicode NFD form). Normalize the filename to NFC, NFKC,
# NFKD in Python is useless, because darwin will normalize it later and so
# open(), os.stat(), etc. don't raise any exception.
- @unittest.skipIf(sys.platform == 'darwin', 'irrevelant test on Mac OS X')
+ @unittest.skipIf(sys.platform == 'darwin', 'irrelevant test on Mac OS X')
def test_normalize(self):
files = set(f for f in self.files if isinstance(f, unicode))
others = set()
@@ -145,7 +145,7 @@ class UnicodeFileTests(unittest.TestCase):
# Skip the test on darwin, because darwin uses a normalization different
# than Python NFD normalization: filenames are different even if we use
# Python NFD normalization.
- @unittest.skipIf(sys.platform == 'darwin', 'irrevelant test on Mac OS X')
+ @unittest.skipIf(sys.platform == 'darwin', 'irrelevant test on Mac OS X')
def test_listdir(self):
sf0 = set(self.files)
f1 = os.listdir(test_support.TESTFN)
diff --git a/Lib/test/test_pkg.py b/Lib/test/test_pkg.py
index 6fb3f3d794..5f1659b0f6 100644
--- a/Lib/test/test_pkg.py
+++ b/Lib/test/test_pkg.py
@@ -54,7 +54,7 @@ class Test(unittest.TestCase):
if self.root: # Only clean if the test was actually run
cleanout(self.root)
- # delete all modules concerning the tested hiearchy
+ # delete all modules concerning the tested hierarchy
if self.pkgname:
modules = [name for name in sys.modules
if self.pkgname in name.split('.')]
diff --git a/Lib/test/test_print.py b/Lib/test/test_print.py
index 757f90f570..b7263470e2 100644
--- a/Lib/test/test_print.py
+++ b/Lib/test/test_print.py
@@ -15,7 +15,7 @@ NotDefined = object()
# A dispatch table all 8 combinations of providing
# sep, end, and file
# I use this machinery so that I'm not just passing default
-# values to print, I'm eiher passing or not passing in the
+# values to print, I'm either passing or not passing in the
# arguments
dispatch = {
(False, False, False):
diff --git a/Lib/test/test_strptime.py b/Lib/test/test_strptime.py
index a233b1c3bf..63760c314d 100644
--- a/Lib/test/test_strptime.py
+++ b/Lib/test/test_strptime.py
@@ -536,7 +536,7 @@ class CacheTests(unittest.TestCase):
self.assertIsNot(first_time_re, second_time_re)
# Possible test locale is not supported while initial locale is.
# If this is the case just suppress the exception and fall-through
- # to the reseting to the original locale.
+ # to the resetting to the original locale.
except locale.Error:
pass
# Make sure we don't trample on the locale setting once we leave the
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index ed48379d6b..7994fe67e7 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -266,7 +266,7 @@ SyntaxError: can't assign to function call
Test continue in finally in weird combinations.
-continue in for loop under finally shouuld be ok.
+continue in for loop under finally should be ok.
>>> def test():
... try:
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index 6f174a5991..0062634f7e 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
@@ -559,7 +559,7 @@ class ThreadJoinOnShutdown(BaseTestCase):
# This acquires the lock and then waits until the child has forked
# before returning, which will release the lock soon after. If
# someone else tries to fix this test case by acquiring this lock
- # before forking instead of reseting it, the test case will
+ # before forking instead of resetting it, the test case will
# deadlock when it shouldn't.
condition = w._block
orig_acquire = condition.acquire
diff --git a/Lib/test/test_trace.py b/Lib/test/test_trace.py
index 7a982f1a17..2292ad6155 100644
--- a/Lib/test/test_trace.py
+++ b/Lib/test/test_trace.py
@@ -205,7 +205,7 @@ class TestRunExecCounts(unittest.TestCase):
(self.my_py_filename, firstlineno + 4): 1,
}
- # When used through 'run', some other spurios counts are produced, like
+ # When used through 'run', some other spurious counts are produced, like
# the settrace of threading, which we ignore, just making sure that the
# counts fo traced_func_loop were right.
#
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index c6e24d6bde..a826bb6958 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -641,7 +641,7 @@ class URLopener_Tests(unittest.TestCase):
# Just commented them out.
# Can't really tell why keep failing in windows and sparc.
-# Everywhere else they work ok, but on those machines, someteimes
+# Everywhere else they work ok, but on those machines, sometimes
# fail in one of the tests, sometimes in other. I have a linux, and
# the tests go ok.
# If anybody has one of the problematic enviroments, please help!
diff --git a/Lib/test/test_warnings.py b/Lib/test/test_warnings.py
index 1c2c0c2698..5c4fa59861 100644
--- a/Lib/test/test_warnings.py
+++ b/Lib/test/test_warnings.py
@@ -320,7 +320,7 @@ class WarnTests(unittest.TestCase):
sys.argv = argv
def test_warn_explicit_type_errors(self):
- # warn_explicit() shoud error out gracefully if it is given objects
+ # warn_explicit() should error out gracefully if it is given objects
# of the wrong types.
# lineno is expected to be an integer.
self.assertRaises(TypeError, self.module.warn_explicit,
diff --git a/Lib/unittest/test/test_program.py b/Lib/unittest/test/test_program.py
index 263a3ab1f6..45d90975e7 100644
--- a/Lib/unittest/test/test_program.py
+++ b/Lib/unittest/test/test_program.py
@@ -224,7 +224,7 @@ class TestCommandLineArgs(unittest.TestCase):
program.runTests()
- # If initialising raises a type error it should be retried
+ # If initializing raises a type error it should be retried
# without the new keyword arguments
self.assertEqual(FakeRunner.initArgs, {})
self.assertEqual(FakeRunner.test, 'test')
diff --git a/Lib/xml/dom/minicompat.py b/Lib/xml/dom/minicompat.py
index d491fb69fc..de4cb4f78a 100644
--- a/Lib/xml/dom/minicompat.py
+++ b/Lib/xml/dom/minicompat.py
@@ -6,7 +6,7 @@
#
# NodeList -- lightest possible NodeList implementation
#
-# EmptyNodeList -- lightest possible NodeList that is guarateed to
+# EmptyNodeList -- lightest possible NodeList that is guaranteed to
# remain empty (immutable)
#
# StringTypes -- tuple of defined string types
diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py
index 1712fd2120..7518852798 100644
--- a/Lib/xml/dom/minidom.py
+++ b/Lib/xml/dom/minidom.py
@@ -1875,7 +1875,7 @@ def _clone_node(node, deep, newOwnerDocument):
e._call_user_data_handler(operation, n, entity)
else:
# Note the cloning of Document and DocumentType nodes is
- # implemenetation specific. minidom handles those cases
+ # implementation specific. minidom handles those cases
# directly in the cloneNode() methods.
raise xml.dom.NotSupportedErr("Cannot clone node %s" % repr(node))