Issue #27171: Fix typos in documentation, code comments, and tests
diff --git a/Lib/Cookie.py b/Lib/Cookie.py
index b1704d9..1082363 100644
--- a/Lib/Cookie.py
+++ b/Lib/Cookie.py
@@ -190,7 +190,7 @@
Backwards Compatibility
-----------------------
-In order to keep compatibilty with earlier versions of Cookie.py,
+In order to keep compatibility with earlier versions of Cookie.py,
it is still possible to use Cookie.Cookie() to create a Cookie. In
fact, this simply returns a SmartCookie.
diff --git a/Lib/_osx_support.py b/Lib/_osx_support.py
index 8d3e5d8..d2aaae7 100644
--- a/Lib/_osx_support.py
+++ b/Lib/_osx_support.py
@@ -157,7 +157,7 @@
# gcc-4.2 is either not present, or a copy of 'llvm-gcc' that
# miscompiles Python.
- # skip checks if the compiler was overriden with a CC env variable
+ # skip checks if the compiler was overridden with a CC env variable
if 'CC' in os.environ:
return _config_vars
@@ -193,7 +193,7 @@
if cc != oldcc:
# Found a replacement compiler.
# Modify config vars using new compiler, if not already explicitly
- # overriden by an env variable, preserving additional arguments.
+ # overridden by an env variable, preserving additional arguments.
for cv in _COMPILER_CONFIG_VARS:
if cv in _config_vars and cv not in os.environ:
cv_split = _config_vars[cv].split()
@@ -207,7 +207,7 @@
"""Remove all universal build arguments from config vars"""
for cv in _UNIVERSAL_CONFIG_VARS:
- # Do not alter a config var explicitly overriden by env var
+ # Do not alter a config var explicitly overridden by env var
if cv in _config_vars and cv not in os.environ:
flags = _config_vars[cv]
flags = re.sub('-arch\s+\w+\s', ' ', flags)
@@ -228,7 +228,7 @@
# build extensions on OSX 10.7 and later with the prebuilt
# 32-bit installer on the python.org website.
- # skip checks if the compiler was overriden with a CC env variable
+ # skip checks if the compiler was overridden with a CC env variable
if 'CC' in os.environ:
return _config_vars
@@ -244,7 +244,7 @@
# across Xcode and compiler versions, there is no reliable way
# to be sure why it failed. Assume here it was due to lack of
# PPC support and remove the related '-arch' flags from each
- # config variables not explicitly overriden by an environment
+ # config variables not explicitly overridden by an environment
# variable. If the error was for some other reason, we hope the
# failure will show up again when trying to compile an extension
# module.
@@ -292,7 +292,7 @@
sdk = m.group(1)
if not os.path.exists(sdk):
for cv in _UNIVERSAL_CONFIG_VARS:
- # Do not alter a config var explicitly overriden by env var
+ # Do not alter a config var explicitly overridden by env var
if cv in _config_vars and cv not in os.environ:
flags = _config_vars[cv]
flags = re.sub(r'-isysroot\s+\S+(?:\s|$)', ' ', flags)
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index d8e1ee7..ccd6ce8 100644
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -997,7 +997,7 @@
break
avail += len(chunk)
chunks.append(chunk)
- # n is more then avail only when an EOF occurred or when
+ # n is more than avail only when an EOF occurred or when
# read() would have blocked.
n = min(n, avail)
out = b"".join(chunks)
diff --git a/Lib/bsddb/test/test_all.py b/Lib/bsddb/test/test_all.py
index 004e357..529dfad 100644
--- a/Lib/bsddb/test/test_all.py
+++ b/Lib/bsddb/test/test_all.py
@@ -523,7 +523,7 @@
return path
-# This path can be overriden via "set_test_path_prefix()".
+# This path can be overridden via "set_test_path_prefix()".
import os, os.path
get_new_path.prefix=os.path.join(os.environ.get("TMPDIR",
os.path.join(os.sep,"tmp")), "z-Berkeley_DB")
diff --git a/Lib/decimal.py b/Lib/decimal.py
index 20d9468..4797a7d 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -1082,7 +1082,7 @@
def __pos__(self, context=None):
"""Returns a copy, unless it is a sNaN.
- Rounds the number (if more then precision digits)
+ Rounds the number (if more than precision digits)
"""
if self._is_special:
ans = self._check_nans(context=context)
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py
index d380cb6..3293c44 100644
--- a/Lib/distutils/tests/test_build_ext.py
+++ b/Lib/distutils/tests/test_build_ext.py
@@ -251,7 +251,7 @@
def test_compiler_option(self):
# cmd.compiler is an option and
- # should not be overriden by a compiler instance
+ # should not be overridden by a compiler instance
# when the command is run
dist = Distribution()
cmd = build_ext(dist)
diff --git a/Lib/hotshot/__init__.py b/Lib/hotshot/__init__.py
index 1556ab3..3692f93 100644
--- a/Lib/hotshot/__init__.py
+++ b/Lib/hotshot/__init__.py
@@ -72,7 +72,7 @@
Additional positional and keyword arguments may be passed
along; the result of the call is returned, and exceptions are
- allowed to propogate cleanly, while ensuring that profiling is
+ allowed to propagate cleanly, while ensuring that profiling is
disabled on the way out.
"""
return self._prof.runcall(func, args, kw)
diff --git a/Lib/idlelib/AutoComplete.py b/Lib/idlelib/AutoComplete.py
index 5a90d42..9381bda 100644
--- a/Lib/idlelib/AutoComplete.py
+++ b/Lib/idlelib/AutoComplete.py
@@ -1,6 +1,6 @@
"""AutoComplete.py - An IDLE extension for automatically completing names.
-This extension can complete either attribute names of file names. It can pop
+This extension can complete either attribute names or file names. It can pop
a window with all available names, for the user to select from.
"""
import os
diff --git a/Lib/idlelib/MultiCall.py b/Lib/idlelib/MultiCall.py
index 31a4fb7..a157d7a 100644
--- a/Lib/idlelib/MultiCall.py
+++ b/Lib/idlelib/MultiCall.py
@@ -101,7 +101,7 @@
self.widget.unbind(self.widgetinst, self.sequence, self.handlerid)
# An int in range(1 << len(_modifiers)) represents a combination of modifiers
-# (if the least significent bit is on, _modifiers[0] is on, and so on).
+# (if the least significant bit is on, _modifiers[0] is on, and so on).
# _state_subsets gives for each combination of modifiers, or *state*,
# a list of the states which are a subset of it. This list is ordered by the
# number of modifiers is the state - the most specific state comes first.
diff --git a/Lib/idlelib/rpc.py b/Lib/idlelib/rpc.py
index 5c4aabd..43328e7 100644
--- a/Lib/idlelib/rpc.py
+++ b/Lib/idlelib/rpc.py
@@ -1,4 +1,4 @@
-"""RPC Implemention, originally written for the Python Idle IDE
+"""RPC Implementation, originally written for the Python Idle IDE
For security reasons, GvR requested that Idle's Python execution server process
connect to the Idle process, which listens for the connection. Since Idle has
diff --git a/Lib/locale.py b/Lib/locale.py
index 3ce758f..5aab163 100644
--- a/Lib/locale.py
+++ b/Lib/locale.py
@@ -16,7 +16,7 @@
import operator
import functools
-# keep a copy of the builtin str type, because 'str' name is overriden
+# keep a copy of the builtin str type, because 'str' name is overridden
# in globals by a function below
_str = str
diff --git a/Lib/pdb.doc b/Lib/pdb.doc
index 375be2f..c8c1c93 100644
--- a/Lib/pdb.doc
+++ b/Lib/pdb.doc
@@ -48,7 +48,7 @@
directory, it is read in and executed as if it had been typed at the
debugger prompt. This is particularly useful for aliases. If both
files exist, the one in the home directory is read first and aliases
-defined there can be overriden by the local file.
+defined there can be overridden by the local file.
Aside from aliases, the debugger is not directly programmable; but it
is implemented as a class from which you can derive your own debugger
diff --git a/Lib/plat-mac/bgenlocations.py b/Lib/plat-mac/bgenlocations.py
index 38f4159..2f535d2 100644
--- a/Lib/plat-mac/bgenlocations.py
+++ b/Lib/plat-mac/bgenlocations.py
@@ -34,7 +34,7 @@
# Creator for C files:
CREATOR="CWIE"
-# The previous definitions can be overriden by creating a module
+# The previous definitions can be overridden by creating a module
# bgenlocationscustomize.py and putting it in site-packages (or anywere else
# on sys.path, actually)
try:
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 2387029..fe79b82 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -708,7 +708,7 @@
pass
def check_sendall_interrupted(self, with_timeout):
- # socketpair() is not stricly required, but it makes things easier.
+ # socketpair() is not strictly required, but it makes things easier.
if not hasattr(signal, 'alarm') or not hasattr(socket, 'socketpair'):
self.skipTest("signal.alarm and socket.socketpair required for this test")
# Our signal handlers clobber the C errno by calling a math function
@@ -827,7 +827,7 @@
self.serv_conn.sendall(big_chunk)
@unittest.skipUnless(hasattr(socket, 'fromfd'),
- 'socket.fromfd not availble')
+ 'socket.fromfd not available')
def testFromFd(self):
# Testing fromfd()
fd = self.cli_conn.fileno()
diff --git a/Lib/test/test_sys_setprofile.py b/Lib/test/test_sys_setprofile.py
index e82559f..18b013d 100644
--- a/Lib/test/test_sys_setprofile.py
+++ b/Lib/test/test_sys_setprofile.py
@@ -165,7 +165,7 @@
(1, 'return', g_ident),
])
- def test_exception_propogation(self):
+ def test_exception_propagation(self):
def f(p):
1./0
def g(p):