summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-07-28 01:11:04 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-07-28 01:11:04 (GMT)
commiteb9957065acaafbf3d8ebee4770ecb13ea0c07c0 (patch)
treea5caf4a201daa6a5094eb18f605cb2b4b7bc91fd /Lib
parenteac67be948e972dc12b7b4abfa83b09becf6422c (diff)
downloadcpython-eb9957065acaafbf3d8ebee4770ecb13ea0c07c0.zip
cpython-eb9957065acaafbf3d8ebee4770ecb13ea0c07c0.tar.gz
cpython-eb9957065acaafbf3d8ebee4770ecb13ea0c07c0.tar.bz2
Issue #27626: Spelling fixes in docs, comments and internal names
Based on patch by Ville Skyttä.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ctypes/test/test_numbers.py2
-rw-r--r--Lib/ctypes/test/test_structures.py2
-rw-r--r--Lib/datetime.py2
-rw-r--r--Lib/idlelib/CallTipWindow.py2
-rw-r--r--Lib/idlelib/ParenMatch.py2
-rwxr-xr-xLib/platform.py2
-rw-r--r--Lib/shutil.py2
-rw-r--r--Lib/test/eintrdata/eintr_tester.py2
-rw-r--r--Lib/test/test_collections.py2
-rw-r--r--Lib/test/test_deque.py2
-rw-r--r--Lib/test/test_enum.py20
-rw-r--r--Lib/test/test_http_cookiejar.py2
-rw-r--r--Lib/test/test_math.py4
-rw-r--r--Lib/test/test_nntplib.py4
-rw-r--r--Lib/test/test_shutil.py2
-rw-r--r--Lib/test/test_structseq.py2
-rw-r--r--Lib/test/test_subprocess.py2
-rw-r--r--Lib/unittest/case.py4
18 files changed, 30 insertions, 30 deletions
diff --git a/Lib/ctypes/test/test_numbers.py b/Lib/ctypes/test/test_numbers.py
index 2afca26..ba4f563 100644
--- a/Lib/ctypes/test/test_numbers.py
+++ b/Lib/ctypes/test/test_numbers.py
@@ -76,7 +76,7 @@ class NumberTestCase(unittest.TestCase):
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
index d998c27..c4a651c 100644
--- a/Lib/ctypes/test/test_structures.py
+++ b/Lib/ctypes/test/test_structures.py
@@ -106,7 +106,7 @@ class StructureTestCase(unittest.TestCase):
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/datetime.py b/Lib/datetime.py
index 2f94218..a2178c7 100644
--- a/Lib/datetime.py
+++ b/Lib/datetime.py
@@ -706,7 +706,7 @@ class date:
@classmethod
def fromordinal(cls, n):
- """Contruct a date from a proleptic Gregorian ordinal.
+ """Construct a date from a proleptic Gregorian ordinal.
January 1 of year 1 is day 1. Only the year, month and day are
non-zero in the result.
diff --git a/Lib/idlelib/CallTipWindow.py b/Lib/idlelib/CallTipWindow.py
index 8e68a76..9eec175 100644
--- a/Lib/idlelib/CallTipWindow.py
+++ b/Lib/idlelib/CallTipWindow.py
@@ -9,7 +9,7 @@ HIDE_VIRTUAL_EVENT_NAME = "<<calltipwindow-hide>>"
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
index 19bad8c..47e10f3 100644
--- a/Lib/idlelib/ParenMatch.py
+++ b/Lib/idlelib/ParenMatch.py
@@ -9,7 +9,7 @@ from idlelib.HyperParser import HyperParser
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
index d58494c..b8f3ebc 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -61,7 +61,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/shutil.py b/Lib/shutil.py
index 37124a0..3174648 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -853,7 +853,7 @@ def register_unpack_format(name, extensions, function, extra_args=None,
_UNPACK_FORMATS[name] = extensions, function, extra_args, description
def unregister_unpack_format(name):
- """Removes the pack format from the registery."""
+ """Removes the pack format from the registry."""
del _UNPACK_FORMATS[name]
def _ensure_directory(path):
diff --git a/Lib/test/eintrdata/eintr_tester.py b/Lib/test/eintrdata/eintr_tester.py
index 9931a55..e3f1aa5 100644
--- a/Lib/test/eintrdata/eintr_tester.py
+++ b/Lib/test/eintrdata/eintr_tester.py
@@ -372,7 +372,7 @@ class SignalEINTRTest(EINTRBaseTest):
@unittest.skipUnless(hasattr(signal, 'sigwaitinfo'),
'need signal.sigwaitinfo()')
def test_sigwaitinfo(self):
- # Issue #25277, #25868: give a few miliseconds to the parent process
+ # Issue #25277, #25868: give a few milliseconds to the parent process
# between os.write() and signal.sigwaitinfo() to works around a race
# condition
self.sleep_time = 0.100
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index 4c32e09..5238382 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -114,7 +114,7 @@ class TestChainMap(unittest.TestCase):
self.assertEqual(f['b'], 5) # find first in chain
self.assertEqual(f.parents['b'], 2) # look beyond maps[0]
- def test_contructor(self):
+ def test_constructor(self):
self.assertEqual(ChainMap().maps, [{}]) # no-args --> one new dict
self.assertEqual(ChainMap({1:2}).maps, [{1:2}]) # 1 arg --> list
diff --git a/Lib/test/test_deque.py b/Lib/test/test_deque.py
index f525429..18e1df0 100644
--- a/Lib/test/test_deque.py
+++ b/Lib/test/test_deque.py
@@ -494,7 +494,7 @@ class TestBasic(unittest.TestCase):
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_enum.py b/Lib/test/test_enum.py
index e970a26..630b155 100644
--- a/Lib/test/test_enum.py
+++ b/Lib/test/test_enum.py
@@ -654,7 +654,7 @@ class TestEnum(unittest.TestCase):
self.Season.SPRING]
)
- def test_programatic_function_string(self):
+ def test_programmatic_function_string(self):
SummerMonth = Enum('SummerMonth', 'june july august')
lst = list(SummerMonth)
self.assertEqual(len(lst), len(SummerMonth))
@@ -671,7 +671,7 @@ class TestEnum(unittest.TestCase):
self.assertIn(e, SummerMonth)
self.assertIs(type(e), SummerMonth)
- def test_programatic_function_string_with_start(self):
+ def test_programmatic_function_string_with_start(self):
SummerMonth = Enum('SummerMonth', 'june july august', start=10)
lst = list(SummerMonth)
self.assertEqual(len(lst), len(SummerMonth))
@@ -688,7 +688,7 @@ class TestEnum(unittest.TestCase):
self.assertIn(e, SummerMonth)
self.assertIs(type(e), SummerMonth)
- def test_programatic_function_string_list(self):
+ def test_programmatic_function_string_list(self):
SummerMonth = Enum('SummerMonth', ['june', 'july', 'august'])
lst = list(SummerMonth)
self.assertEqual(len(lst), len(SummerMonth))
@@ -705,7 +705,7 @@ class TestEnum(unittest.TestCase):
self.assertIn(e, SummerMonth)
self.assertIs(type(e), SummerMonth)
- def test_programatic_function_string_list_with_start(self):
+ def test_programmatic_function_string_list_with_start(self):
SummerMonth = Enum('SummerMonth', ['june', 'july', 'august'], start=20)
lst = list(SummerMonth)
self.assertEqual(len(lst), len(SummerMonth))
@@ -722,7 +722,7 @@ class TestEnum(unittest.TestCase):
self.assertIn(e, SummerMonth)
self.assertIs(type(e), SummerMonth)
- def test_programatic_function_iterable(self):
+ def test_programmatic_function_iterable(self):
SummerMonth = Enum(
'SummerMonth',
(('june', 1), ('july', 2), ('august', 3))
@@ -742,7 +742,7 @@ class TestEnum(unittest.TestCase):
self.assertIn(e, SummerMonth)
self.assertIs(type(e), SummerMonth)
- def test_programatic_function_from_dict(self):
+ def test_programmatic_function_from_dict(self):
SummerMonth = Enum(
'SummerMonth',
OrderedDict((('june', 1), ('july', 2), ('august', 3)))
@@ -762,7 +762,7 @@ class TestEnum(unittest.TestCase):
self.assertIn(e, SummerMonth)
self.assertIs(type(e), SummerMonth)
- def test_programatic_function_type(self):
+ def test_programmatic_function_type(self):
SummerMonth = Enum('SummerMonth', 'june july august', type=int)
lst = list(SummerMonth)
self.assertEqual(len(lst), len(SummerMonth))
@@ -778,7 +778,7 @@ class TestEnum(unittest.TestCase):
self.assertIn(e, SummerMonth)
self.assertIs(type(e), SummerMonth)
- def test_programatic_function_type_with_start(self):
+ def test_programmatic_function_type_with_start(self):
SummerMonth = Enum('SummerMonth', 'june july august', type=int, start=30)
lst = list(SummerMonth)
self.assertEqual(len(lst), len(SummerMonth))
@@ -794,7 +794,7 @@ class TestEnum(unittest.TestCase):
self.assertIn(e, SummerMonth)
self.assertIs(type(e), SummerMonth)
- def test_programatic_function_type_from_subclass(self):
+ def test_programmatic_function_type_from_subclass(self):
SummerMonth = IntEnum('SummerMonth', 'june july august')
lst = list(SummerMonth)
self.assertEqual(len(lst), len(SummerMonth))
@@ -810,7 +810,7 @@ class TestEnum(unittest.TestCase):
self.assertIn(e, SummerMonth)
self.assertIs(type(e), SummerMonth)
- def test_programatic_function_type_from_subclass_with_start(self):
+ def test_programmatic_function_type_from_subclass_with_start(self):
SummerMonth = IntEnum('SummerMonth', 'june july august', start=40)
lst = list(SummerMonth)
self.assertEqual(len(lst), len(SummerMonth))
diff --git a/Lib/test/test_http_cookiejar.py b/Lib/test/test_http_cookiejar.py
index a782608..49c01ae 100644
--- a/Lib/test/test_http_cookiejar.py
+++ b/Lib/test/test_http_cookiejar.py
@@ -396,7 +396,7 @@ class CookieTests(unittest.TestCase):
## 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_math.py b/Lib/test/test_math.py
index 6c7b99d..a379a6a 100644
--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -1254,8 +1254,8 @@ class IsCloseTests(unittest.TestCase):
(1.0e200, .999999999999999e200)]
self.assertAllNotClose(zero_tolerance_not_close_examples, rel_tol=0.0)
- def test_assymetry(self):
- # test the assymetry example from PEP 485
+ def test_asymmetry(self):
+ # test the asymmetry example from PEP 485
self.assertAllClose([(9, 10), (10, 9)], rel_tol=0.1)
def test_integers(self):
diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py
index 994532b..2ef6d02 100644
--- a/Lib/test/test_nntplib.py
+++ b/Lib/test/test_nntplib.py
@@ -1465,14 +1465,14 @@ class MockSocketTests(unittest.TestCase):
def test_service_temporarily_unavailable(self):
#Test service temporarily unavailable
class Handler(NNTPv1Handler):
- welcome = '400 Service temporarily unavilable'
+ welcome = '400 Service temporarily unavailable'
self.check_constructor_error_conditions(
Handler, nntplib.NNTPTemporaryError, Handler.welcome)
def test_service_permanently_unavailable(self):
#Test service permanently unavailable
class Handler(NNTPv1Handler):
- welcome = '502 Service permanently unavilable'
+ welcome = '502 Service permanently unavailable'
self.check_constructor_error_conditions(
Handler, nntplib.NNTPPermanentError, Handler.welcome)
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index 13b30b9..1d5e01a 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -1257,7 +1257,7 @@ class TestShutil(unittest.TestCase):
self.assertRaises(shutil.ReadError, unpack_archive, TESTFN)
self.assertRaises(ValueError, unpack_archive, TESTFN, format='xxx')
- def test_unpack_registery(self):
+ def test_unpack_registry(self):
formats = get_unpack_formats()
diff --git a/Lib/test/test_structseq.py b/Lib/test/test_structseq.py
index 3ecb27d..36630a1 100644
--- a/Lib/test/test_structseq.py
+++ b/Lib/test/test_structseq.py
@@ -97,7 +97,7 @@ class StructSeqTest(unittest.TestCase):
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/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 4704d49..4b409b7 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -1354,7 +1354,7 @@ class POSIXProcessTestCase(BaseTestCase):
desired_exception = e
desired_exception.strerror += ': ' + repr(self._nonexistent_dir)
else:
- self.fail("chdir to nonexistant directory %s succeeded." %
+ self.fail("chdir to nonexistent directory %s succeeded." %
self._nonexistent_dir)
return desired_exception
diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py
index 524a7b1..1e4090c 100644
--- a/Lib/unittest/case.py
+++ b/Lib/unittest/case.py
@@ -836,7 +836,7 @@ class TestCase(object):
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.
@@ -875,7 +875,7 @@ class TestCase(object):
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.
"""