summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-02-21 20:27:01 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-02-21 20:27:01 (GMT)
commit3e4caeb3bf2b2579861e9f3379e3508fbb30549c (patch)
tree05385e9530059fe3608194b2e8d6f9e57d797220 /Lib
parenta12a86e956f949bd145cef247a95ed742386c70b (diff)
downloadcpython-3e4caeb3bf2b2579861e9f3379e3508fbb30549c.zip
cpython-3e4caeb3bf2b2579861e9f3379e3508fbb30549c.tar.gz
cpython-3e4caeb3bf2b2579861e9f3379e3508fbb30549c.tar.bz2
Issue #5341: Fix a variety of spelling errors.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/bsddb/test/test_basics.py2
-rw-r--r--Lib/bsddb/test/test_compat.py2
-rw-r--r--Lib/bsddb/test/test_recno.py2
-rw-r--r--Lib/difflib.py2
-rw-r--r--Lib/distutils/tests/test_core.py2
-rw-r--r--Lib/email/message.py2
-rw-r--r--Lib/idlelib/AutoComplete.py4
-rw-r--r--Lib/idlelib/CallTips.py2
-rw-r--r--Lib/idlelib/NEWS.txt2
-rw-r--r--Lib/io.py4
-rw-r--r--Lib/lib-tk/Tkinter.py2
-rw-r--r--Lib/lib-tk/test/test_ttk/test_style.py2
-rw-r--r--Lib/lib-tk/test/test_ttk/test_widgets.py10
-rw-r--r--Lib/lib-tk/turtle.py2
-rw-r--r--Lib/optparse.py4
-rwxr-xr-xLib/plat-mac/bundlebuilder.py2
-rwxr-xr-xLib/smtpd.py2
-rw-r--r--Lib/subprocess.py4
-rw-r--r--Lib/tarfile.py2
-rw-r--r--Lib/test/test_calendar.py2
-rw-r--r--Lib/test/test_cfgparser.py8
-rw-r--r--Lib/test/test_codeccallbacks.py2
-rw-r--r--Lib/test/test_cookielib.py2
-rw-r--r--Lib/test/test_descrtut.py2
-rw-r--r--Lib/test/test_funcattrs.py2
-rw-r--r--Lib/test/test_urllib2net.py2
-rw-r--r--Lib/wsgiref/headers.py2
27 files changed, 38 insertions, 38 deletions
diff --git a/Lib/bsddb/test/test_basics.py b/Lib/bsddb/test/test_basics.py
index 52de869..0be76db 100644
--- a/Lib/bsddb/test/test_basics.py
+++ b/Lib/bsddb/test/test_basics.py
@@ -131,7 +131,7 @@ class BasicTestCase(unittest.TestCase):
self.assertEqual(d.get('0321'), '0321-0321-0321-0321-0321')
- # By default non-existant keys return None...
+ # By default non-existent keys return None...
self.assertEqual(d.get('abcd'), None)
# ...but they raise exceptions in other situations. Call
diff --git a/Lib/bsddb/test/test_compat.py b/Lib/bsddb/test/test_compat.py
index a3b4eef..0b0fa70 100644
--- a/Lib/bsddb/test/test_compat.py
+++ b/Lib/bsddb/test/test_compat.py
@@ -133,7 +133,7 @@ class CompatibilityTestCase(unittest.TestCase):
except KeyError:
pass
else:
- self.fail("set_location on non-existant key did not raise KeyError")
+ self.fail("set_location on non-existent key did not raise KeyError")
f.sync()
f.close()
diff --git a/Lib/bsddb/test/test_recno.py b/Lib/bsddb/test/test_recno.py
index b5df68b..895be8a 100644
--- a/Lib/bsddb/test/test_recno.py
+++ b/Lib/bsddb/test/test_recno.py
@@ -150,7 +150,7 @@ class SimpleRecnoTestCase(unittest.TestCase):
if verbose:
print rec
- # test that non-existant key lookups work (and that
+ # test that non-existent key lookups work (and that
# DBC_set_range doesn't have a memleak under valgrind)
rec = c.set_range(999999)
self.assertEqual(rec, None)
diff --git a/Lib/difflib.py b/Lib/difflib.py
index 7498e6f..679bd2a 100644
--- a/Lib/difflib.py
+++ b/Lib/difflib.py
@@ -1329,7 +1329,7 @@ def _mdiff(fromlines, tolines, context=None, linejunk=None,
(from line tuple, to line tuple, boolean flag)
from/to line tuple -- (line num, line text)
- line num -- integer or None (to indicate a context seperation)
+ line num -- integer or None (to indicate a context separation)
line text -- original line text with following markers inserted:
'\0+' -- marks start of added text
'\0-' -- marks start of deleted text
diff --git a/Lib/distutils/tests/test_core.py b/Lib/distutils/tests/test_core.py
index 55d2d5d..e481e8d 100644
--- a/Lib/distutils/tests/test_core.py
+++ b/Lib/distutils/tests/test_core.py
@@ -57,7 +57,7 @@ class CoreTestCase(unittest.TestCase):
def test_run_setup_uses_current_dir(self):
# This tests that the setup script is run with the current directory
- # as it's own current directory; this was temporarily broken by a
+ # as its own current directory; this was temporarily broken by a
# previous patch when TESTFN did not use the current directory.
sys.stdout = StringIO.StringIO()
cwd = os.getcwd()
diff --git a/Lib/email/message.py b/Lib/email/message.py
index e44217b..23cedf6 100644
--- a/Lib/email/message.py
+++ b/Lib/email/message.py
@@ -20,7 +20,7 @@ from email import errors
SEMISPACE = '; '
# Regular expression that matches `special' characters in parameters, the
-# existance of which force quoting of the parameter value.
+# existence of which force quoting of the parameter value.
tspecials = re.compile(r'[ \(\)<>@,;:\\"/\[\]\?=]')
diff --git a/Lib/idlelib/AutoComplete.py b/Lib/idlelib/AutoComplete.py
index 1c74d2e..d55b799 100644
--- a/Lib/idlelib/AutoComplete.py
+++ b/Lib/idlelib/AutoComplete.py
@@ -67,7 +67,7 @@ class AutoComplete:
def try_open_completions_event(self, event):
"""Happens when it would be nice to open a completion list, but not
- really neccesary, for example after an dot, so function
+ really necessary, for example after an dot, so function
calls won't be made.
"""
lastchar = self.text.get("insert-1c")
@@ -79,7 +79,7 @@ class AutoComplete:
COMPLETE_FILES)
def autocomplete_event(self, event):
- """Happens when the user wants to complete his word, and if neccesary,
+ """Happens when the user wants to complete his word, and if necessary,
open a completion list after that (if there is more than one
completion)
"""
diff --git a/Lib/idlelib/CallTips.py b/Lib/idlelib/CallTips.py
index 7bcc1e2..bd51b7f 100644
--- a/Lib/idlelib/CallTips.py
+++ b/Lib/idlelib/CallTips.py
@@ -51,7 +51,7 @@ class CallTips:
def try_open_calltip_event(self, event):
"""Happens when it would be nice to open a CallTip, but not really
- neccesary, for example after an opening bracket, so function calls
+ necessary, for example after an opening bracket, so function calls
won't be made.
"""
self.open_calltip(False)
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
index 27db970..965a8c1 100644
--- a/Lib/idlelib/NEWS.txt
+++ b/Lib/idlelib/NEWS.txt
@@ -300,7 +300,7 @@ What's New in IDLE 1.1a3?
window raising, especially in the Windows menu and in the debugger.
IDLEfork 763524.
-- If user passes a non-existant filename on the commandline, just
+- If user passes a non-existent filename on the commandline, just
open a new file, don't raise a dialog. IDLEfork 854928.
diff --git a/Lib/io.py b/Lib/io.py
index 320a4b9..61206c4 100644
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -4,7 +4,7 @@ builtin open function is defined in this module.
At the top of the I/O hierarchy is the abstract base class IOBase. It
defines the basic interface to a stream. Note, however, that there is no
-seperation between reading and writing to streams; implementations are
+separation between reading and writing to streams; implementations are
allowed to throw an IOError if they do not support a given operation.
Extending IOBase is RawIOBase which deals simply with the reading and
@@ -1374,7 +1374,7 @@ class TextIOWrapper(TextIOBase):
enabled. With this enabled, on input, the lines endings '\n', '\r',
or '\r\n' are translated to '\n' before being returned to the
caller. Conversely, on output, '\n' is translated to the system
- default line seperator, os.linesep. If newline is any other of its
+ default line separator, os.linesep. If newline is any other of its
legal values, that newline becomes the newline when the file is read
and it is returned untranslated. On output, '\n' is converted to the
newline.
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index fded249..53249e7 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -3316,7 +3316,7 @@ class PhotoImage(Image):
"""Return the color (red, green, blue) of the pixel at X,Y."""
return self.tk.call(self.name, 'get', x, y)
def put(self, data, to=None):
- """Put row formated colors to image starting from
+ """Put row formatted colors to image starting from
position TO, e.g. image.put("{red green} {blue yellow}", to=(4,6))"""
args = (self.name, 'put', data)
if to:
diff --git a/Lib/lib-tk/test/test_ttk/test_style.py b/Lib/lib-tk/test/test_ttk/test_style.py
index 6754598..ab3554d 100644
--- a/Lib/lib-tk/test/test_ttk/test_style.py
+++ b/Lib/lib-tk/test/test_ttk/test_style.py
@@ -61,7 +61,7 @@ class StyleTest(unittest.TestCase):
# correct layout, but "option" doesn't exist as option
self.failUnlessRaises(Tkinter.TclError, style.layout, 'Treeview',
- [('name', {'option': 'inexistant'})])
+ [('name', {'option': 'inexistent'})])
def test_theme_use(self):
diff --git a/Lib/lib-tk/test/test_ttk/test_widgets.py b/Lib/lib-tk/test/test_ttk/test_widgets.py
index 913ccb4..4f6f44d 100644
--- a/Lib/lib-tk/test/test_ttk/test_widgets.py
+++ b/Lib/lib-tk/test/test_ttk/test_widgets.py
@@ -861,9 +861,9 @@ class TreeviewTest(unittest.TestCase):
# bad values
self.failUnlessRaises(Tkinter.TclError,
- self.tv.reattach, 'nonexistant', '', 'end')
+ self.tv.reattach, 'nonexistent', '', 'end')
self.failUnlessRaises(Tkinter.TclError,
- self.tv.detach, 'nonexistant')
+ self.tv.detach, 'nonexistent')
self.failUnlessRaises(Tkinter.TclError,
self.tv.reattach, item2, 'otherparent', 'end')
self.failUnlessRaises(Tkinter.TclError,
@@ -897,7 +897,7 @@ class TreeviewTest(unittest.TestCase):
self.tv.delete(item1)
self.failUnlessEqual(self.tv.focus(), '')
- # try focusing inexistant item
+ # try focusing inexistent item
self.failUnlessRaises(Tkinter.TclError, self.tv.focus, 'hi')
@@ -1064,11 +1064,11 @@ class TreeviewTest(unittest.TestCase):
self.failUnlessEqual(self.tv.item(item, values=None), (123, 'a'))
self.failUnlessEqual(self.tv.set(item), {'B': 123})
- # inexistant column
+ # inexistent column
self.failUnlessRaises(Tkinter.TclError, self.tv.set, item, 'A')
self.failUnlessRaises(Tkinter.TclError, self.tv.set, item, 'A', 'b')
- # inexistant item
+ # inexistent item
self.failUnlessRaises(Tkinter.TclError, self.tv.set, 'notme')
diff --git a/Lib/lib-tk/turtle.py b/Lib/lib-tk/turtle.py
index 7bce6f6..a3dc852 100644
--- a/Lib/lib-tk/turtle.py
+++ b/Lib/lib-tk/turtle.py
@@ -2794,7 +2794,7 @@ class RawTurtle(TPen, TNavigator):
def _drawturtle(self):
"""Manages the correct rendering of the turtle with respect to
- its shape, resizemode, strech and tilt etc."""
+ its shape, resizemode, stretch and tilt etc."""
screen = self.screen
shape = screen._shapes[self.turtle.shapeIndex]
ttype = shape._type
diff --git a/Lib/optparse.py b/Lib/optparse.py
index 16a0f19..1107d9e 100644
--- a/Lib/optparse.py
+++ b/Lib/optparse.py
@@ -1574,7 +1574,7 @@ class OptionParser (OptionContainer):
"""print_usage(file : file = stdout)
Print the usage message for the current program (self.usage) to
- 'file' (default stdout). Any occurence of the string "%prog" in
+ 'file' (default stdout). Any occurrence of the string "%prog" in
self.usage is replaced with the name of the current program
(basename of sys.argv[0]). Does nothing if self.usage is empty
or not defined.
@@ -1592,7 +1592,7 @@ class OptionParser (OptionContainer):
"""print_version(file : file = stdout)
Print the version message for this program (self.version) to
- 'file' (default stdout). As with print_usage(), any occurence
+ 'file' (default stdout). As with print_usage(), any occurrence
of "%prog" in self.version is replaced by the current program's
name. Does nothing if self.version is empty or undefined.
"""
diff --git a/Lib/plat-mac/bundlebuilder.py b/Lib/plat-mac/bundlebuilder.py
index 8f59969..61cadba 100755
--- a/Lib/plat-mac/bundlebuilder.py
+++ b/Lib/plat-mac/bundlebuilder.py
@@ -669,7 +669,7 @@ class AppBuilder(BundleBuilder):
if self.use_zipimport:
if name != "zlib":
# neatly pack all extension modules in a subdirectory,
- # except zlib, since it's neccesary for bootstrapping.
+ # except zlib, since it's necessary for bootstrapping.
dstpath = pathjoin("ExtensionModules", dstpath)
# Python modules are stored in a Zip archive, but put
# extensions in Contents/Resources/. Add a tiny "loader"
diff --git a/Lib/smtpd.py b/Lib/smtpd.py
index e09774f..3992d7b 100755
--- a/Lib/smtpd.py
+++ b/Lib/smtpd.py
@@ -420,7 +420,7 @@ class MailmanProxy(PureProxy):
s = StringIO(data)
msg = Message.Message(s)
# These headers are required for the proper execution of Mailman. All
- # MTAs in existance seem to add these if the original message doesn't
+ # MTAs in existence seem to add these if the original message doesn't
# have them.
if not msg.getheader('from'):
msg['From'] = mailfrom
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index d91fbee..98399b8 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -494,9 +494,9 @@ def check_output(*popenargs, **kwargs):
To capture standard error in the result, use stderr=subprocess.STDOUT.
>>> check_output(["/bin/sh", "-c",
- "ls -l non_existant_file ; exit 0"],
+ "ls -l non_existent_file ; exit 0"],
stderr=subprocess.STDOUT)
- 'ls: non_existant_file: No such file or directory\n'
+ 'ls: non_existent_file: No such file or directory\n'
"""
if 'stdout' in kwargs:
raise ValueError('stdout argument not allowed, it will be overridden.')
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index b678185..9191a82 100644
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -1772,7 +1772,7 @@ class TarFile(object):
def getmember(self, name):
"""Return a TarInfo object for member `name'. If `name' can not be
found in the archive, KeyError is raised. If a member occurs more
- than once in the archive, its last occurence is assumed to be the
+ than once in the archive, its last occurrence is assumed to be the
most up-to-date version.
"""
tarinfo = self._getmember(name)
diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py
index 75eaebd..fad517c 100644
--- a/Lib/test/test_calendar.py
+++ b/Lib/test/test_calendar.py
@@ -170,7 +170,7 @@ result_2004_html = """
class OutputTestCase(unittest.TestCase):
def normalize_calendar(self, s):
- # Filters out locale dependant strings
+ # Filters out locale dependent strings
def neitherspacenordigit(c):
return not c.isspace() and not c.isdigit()
diff --git a/Lib/test/test_cfgparser.py b/Lib/test/test_cfgparser.py
index a8b5d7c..600d2dc 100644
--- a/Lib/test/test_cfgparser.py
+++ b/Lib/test/test_cfgparser.py
@@ -87,11 +87,11 @@ class TestCaseBase(unittest.TestCase):
# Make sure the right things happen for remove_option();
# added to include check for SourceForge bug #123324:
self.failUnless(cf.remove_option('Foo Bar', 'foo'),
- "remove_option() failed to report existance of option")
+ "remove_option() failed to report existence of option")
self.failIf(cf.has_option('Foo Bar', 'foo'),
"remove_option() failed to remove option")
self.failIf(cf.remove_option('Foo Bar', 'foo'),
- "remove_option() failed to report non-existance of option"
+ "remove_option() failed to report non-existence of option"
" that was removed")
self.assertRaises(ConfigParser.NoSectionError,
@@ -264,7 +264,7 @@ class TestCaseBase(unittest.TestCase):
file1 = test_support.findfile("cfgparser.1")
# check when we pass a mix of readable and non-readable files:
cf = self.newconfig()
- parsed_files = cf.read([file1, "nonexistant-file"])
+ parsed_files = cf.read([file1, "nonexistent-file"])
self.assertEqual(parsed_files, [file1])
self.assertEqual(cf.get("Foo Bar", "foo"), "newbar")
# check when we pass only a filename:
@@ -274,7 +274,7 @@ class TestCaseBase(unittest.TestCase):
self.assertEqual(cf.get("Foo Bar", "foo"), "newbar")
# check when we pass only missing files:
cf = self.newconfig()
- parsed_files = cf.read(["nonexistant-file"])
+ parsed_files = cf.read(["nonexistent-file"])
self.assertEqual(parsed_files, [])
# check when we pass no files:
cf = self.newconfig()
diff --git a/Lib/test/test_codeccallbacks.py b/Lib/test/test_codeccallbacks.py
index db0bc96..dfd12e5 100644
--- a/Lib/test/test_codeccallbacks.py
+++ b/Lib/test/test_codeccallbacks.py
@@ -109,7 +109,7 @@ class CodecCallbackTest(unittest.TestCase):
# useful that the error handler is not called for every single
# unencodable character, but for a complete sequence of
# unencodable characters, otherwise we would output many
- # unneccessary escape sequences.
+ # unnecessary escape sequences.
def uninamereplace(exc):
if not isinstance(exc, UnicodeEncodeError):
diff --git a/Lib/test/test_cookielib.py b/Lib/test/test_cookielib.py
index 66f9a83..93d62f7 100644
--- a/Lib/test/test_cookielib.py
+++ b/Lib/test/test_cookielib.py
@@ -1714,7 +1714,7 @@ class LWPCookieTests(TestCase):
counter[key] = counter[key] + 1
self.assert_(not (
- # a permanent cookie got lost accidently
+ # a permanent cookie got lost accidentally
counter["perm_after"] != counter["perm_before"] or
# a session cookie hasn't been cleared
counter["session_after"] != 0 or
diff --git a/Lib/test/test_descrtut.py b/Lib/test/test_descrtut.py
index 8088819..c455e6b 100644
--- a/Lib/test/test_descrtut.py
+++ b/Lib/test/test_descrtut.py
@@ -54,7 +54,7 @@ Here's the new type at work:
{1: 3.25}
>>> print a[1] # show the new item
3.25
- >>> print a[0] # a non-existant item
+ >>> print a[0] # a non-existent item
0.0
>>> a.merge({1:100, 2:200}) # use a dict method
>>> print sortdict(a) # show the result
diff --git a/Lib/test/test_funcattrs.py b/Lib/test/test_funcattrs.py
index e245d59..f374c8d 100644
--- a/Lib/test/test_funcattrs.py
+++ b/Lib/test/test_funcattrs.py
@@ -196,7 +196,7 @@ class ArbitraryFunctionAttrTest(FuncAttrsTest):
def test_unset_attr(self):
for func in [self.b, self.f.a, self.fi.a]:
- try: func.non_existant_attr
+ try: func.non_existent_attr
except AttributeError: pass
else: self.fail("using unknown attributes should raise "
"AttributeError")
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py
index 3d01b31..b4e6ae5 100644
--- a/Lib/test/test_urllib2net.py
+++ b/Lib/test/test_urllib2net.py
@@ -104,7 +104,7 @@ class OtherNetworkTests(unittest.TestCase):
def test_ftp(self):
urls = [
'ftp://ftp.kernel.org/pub/linux/kernel/README',
- 'ftp://ftp.kernel.org/pub/linux/kernel/non-existant-file',
+ 'ftp://ftp.kernel.org/pub/linux/kernel/non-existent-file',
#'ftp://ftp.kernel.org/pub/leenox/kernel/test',
'ftp://gatekeeper.research.compaq.com/pub/DEC/SRC'
'/research-reports/00README-Legal-Rules-Regs',
diff --git a/Lib/wsgiref/headers.py b/Lib/wsgiref/headers.py
index 3169acf..02fd6a0 100644
--- a/Lib/wsgiref/headers.py
+++ b/Lib/wsgiref/headers.py
@@ -8,7 +8,7 @@ written by Barry Warsaw.
from types import ListType, TupleType
# Regular expression that matches `special' characters in parameters, the
-# existance of which force quoting of the parameter value.
+# existence of which force quoting of the parameter value.
import re
tspecials = re.compile(r'[ \(\)<>@,;:\\"/\[\]\?=]')