Skip to content

Commit

Permalink
Spelling fixes (python#2902)
Browse files Browse the repository at this point in the history
  • Loading branch information
scop authored and serhiy-storchaka committed Aug 3, 2017
1 parent d9d55c9 commit 49b2734
Show file tree
Hide file tree
Showing 29 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion Doc/library/sys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ always available.
:class:`~collections.namedtuple` of the form `(firstiter, finalizer)`,
where *firstiter* and *finalizer* are expected to be either ``None`` or
functions which take an :term:`asynchronous generator iterator` as an
argument, and are used to schedule finalization of an asychronous
argument, and are used to schedule finalization of an asynchronous
generator by an event loop.

.. versionadded:: 3.6
Expand Down
2 changes: 1 addition & 1 deletion Include/abstract.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ PyAPI_FUNC(PyObject*) _PyStack_AsTupleSlice(
format to a Python dictionary ("kwargs" dict).
The type of kwnames keys is not checked. The final function getting
arguments is reponsible to check if all keys are strings, for example using
arguments is responsible to check if all keys are strings, for example using
PyArg_ParseTupleAndKeywords() or PyArg_ValidateKeywordArguments().
Duplicate keys are merged using the last value. If duplicate keys must raise
Expand Down
2 changes: 1 addition & 1 deletion Include/unicodeobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ PyAPI_FUNC(PyObject*) PyUnicode_Encode(
/* Encodes a Unicode object and returns the result as Python
object.
This API is DEPRECATED. It is superceeded by PyUnicode_AsEncodedString()
This API is DEPRECATED. It is superseded by PyUnicode_AsEncodedString()
since all standard encodings (except rot13) encode str to bytes.
Use PyCodec_Encode() for encoding with rot13 and non-standard codecs
that encode form str to non-bytes. */
Expand Down
2 changes: 1 addition & 1 deletion Lib/enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ def _decompose(flag, value):
not_covered = value
negative = value < 0
# issue29167: wrap accesses to _value2member_map_ in a list to avoid race
# conditions between iterating over it and having more psuedo-
# conditions between iterating over it and having more pseudo-
# members added to it
if negative:
# only check for named flags
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/configdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ def create_page_extensions(self):
which are boolean, and can be toggled with a True/False button.
Methods:
load_extentions:
load_extensions:
extension_selected: Handle selection from list.
create_extension_frame: Hold widgets for one extension.
set_extension_value: Set in userCfg['extensions'].
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/decimaltestdata/ddDivide.decTest
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ dddiv1056 divide 1e-277 -1e+311 -> -0E-398 Underflow Subnormal Inexact Rounded
dddiv1057 divide -1e-277 1e+311 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
dddiv1058 divide -1e-277 -1e+311 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped

-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
-- 'subnormal' boundary (all hard underflow or overflow in base arithmetic)
dddiv1060 divide 1e-291 1e+101 -> 1E-392 Subnormal
dddiv1061 divide 1e-291 1e+102 -> 1E-393 Subnormal
dddiv1062 divide 1e-291 1e+103 -> 1E-394 Subnormal
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/decimaltestdata/ddDivideInt.decTest
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ dddvi1056 divideint 1e-277 -1e+311 -> -0
dddvi1057 divideint -1e-277 1e+311 -> -0
dddvi1058 divideint -1e-277 -1e+311 -> 0

-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
-- 'subnormal' boundary (all hard underflow or overflow in base arithmetic)
dddvi1060 divideint 1e-291 1e+101 -> 0
dddvi1061 divideint 1e-291 1e+102 -> 0
dddvi1062 divideint 1e-291 1e+103 -> 0
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/decimaltestdata/ddFMA.decTest
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ extended: 1
clamp: 1
rounding: half_even

-- These tests comprese three parts:
-- These tests comprise three parts:
-- 1. Sanity checks and other three-operand tests (especially those
-- where the fused operation makes a difference)
-- 2. Multiply tests (third operand is neutral zero [0E+emax])
Expand Down Expand Up @@ -458,7 +458,7 @@ ddfma2756 fma 1e-277 -1e-311 0e+384 -> -0E-398 Underflow Subnormal Inexact
ddfma2757 fma -1e-277 1e-311 0e+384 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
ddfma2758 fma -1e-277 -1e-311 0e+384 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped

-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
-- 'subnormal' boundary (all hard underflow or overflow in base arithmetic)
ddfma2760 fma 1e-291 1e-101 0e+384 -> 1E-392 Subnormal
ddfma2761 fma 1e-291 1e-102 0e+384 -> 1E-393 Subnormal
ddfma2762 fma 1e-291 1e-103 0e+384 -> 1E-394 Subnormal
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/decimaltestdata/ddMultiply.decTest
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ ddmul756 multiply 1e-277 -1e-311 -> -0E-398 Underflow Subnormal Inexact Rounded
ddmul757 multiply -1e-277 1e-311 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
ddmul758 multiply -1e-277 -1e-311 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped

-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
-- 'subnormal' boundary (all hard underflow or overflow in base arithmetic)
ddmul760 multiply 1e-291 1e-101 -> 1E-392 Subnormal
ddmul761 multiply 1e-291 1e-102 -> 1E-393 Subnormal
ddmul762 multiply 1e-291 1e-103 -> 1E-394 Subnormal
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/decimaltestdata/divide.decTest
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ divx959 divide 9E-999999999 -9.100 -> -9.8901099E-1000000000 Inexact Rounded Und

-- overflow and underflow (additional edge tests in multiply.decTest)
-- 'subnormal' results now possible (all hard underflow or overflow in
-- base arithemtic)
-- base arithmetic)
divx960 divide 1e-600000000 1e+400000001 -> 1E-1000000001 Subnormal
divx961 divide 1e-600000000 1e+400000002 -> 1E-1000000002 Subnormal
divx962 divide 1e-600000000 1e+400000003 -> 1E-1000000003 Subnormal
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/decimaltestdata/dqDivide.decTest
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ dqdiv1756 divide 1e-4277 -1e+3311 -> -0E-6176 Underflow Subnormal Inexact Round
dqdiv1757 divide -1e-4277 1e+3311 -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqdiv1758 divide -1e-4277 -1e+3311 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped

-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
-- 'subnormal' boundary (all hard underflow or overflow in base arithmetic)
dqdiv1760 divide 1e-6069 1e+101 -> 1E-6170 Subnormal
dqdiv1761 divide 1e-6069 1e+102 -> 1E-6171 Subnormal
dqdiv1762 divide 1e-6069 1e+103 -> 1E-6172 Subnormal
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/decimaltestdata/dqDivideInt.decTest
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ dqdvi1056 divideint 1e-277 -1e+311 -> -0
dqdvi1057 divideint -1e-277 1e+311 -> -0
dqdvi1058 divideint -1e-277 -1e+311 -> 0

-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
-- 'subnormal' boundary (all hard underflow or overflow in base arithmetic)
dqdvi1060 divideint 1e-291 1e+101 -> 0
dqdvi1061 divideint 1e-291 1e+102 -> 0
dqdvi1062 divideint 1e-291 1e+103 -> 0
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/decimaltestdata/dqFMA.decTest
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ maxExponent: 6144
minExponent: -6143
rounding: half_even

-- These tests comprese three parts:
-- These tests comprise three parts:
-- 1. Sanity checks and other three-operand tests (especially those
-- where the fused operation makes a difference)
-- 2. Multiply tests (third operand is neutral zero [0E+emax])
Expand Down Expand Up @@ -476,7 +476,7 @@ dqfma2756 fma 1e-4277 -1e-3311 0e+6144 -> -0E-6176 Underflow Subnormal Inex
dqfma2757 fma -1e-4277 1e-3311 0e+6144 -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqfma2758 fma -1e-4277 -1e-3311 0e+6144 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped

-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
-- 'subnormal' boundary (all hard underflow or overflow in base arithmetic)
dqfma2760 fma 1e-6069 1e-101 0e+6144 -> 1E-6170 Subnormal
dqfma2761 fma 1e-6069 1e-102 0e+6144 -> 1E-6171 Subnormal
dqfma2762 fma 1e-6069 1e-103 0e+6144 -> 1E-6172 Subnormal
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/decimaltestdata/dqMultiply.decTest
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ dqmul756 multiply 1e-4277 -1e-3311 -> -0E-6176 Underflow Subnormal Inexact Roun
dqmul757 multiply -1e-4277 1e-3311 -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqmul758 multiply -1e-4277 -1e-3311 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped

-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
-- 'subnormal' boundary (all hard underflow or overflow in base arithmetic)
dqmul760 multiply 1e-6069 1e-101 -> 1E-6170 Subnormal
dqmul761 multiply 1e-6069 1e-102 -> 1E-6171 Subnormal
dqmul762 multiply 1e-6069 1e-103 -> 1E-6172 Subnormal
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/decimaltestdata/fma.decTest
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ rounding: half_up
maxExponent: 384
minexponent: -383

-- These tests comprese three parts:
-- These tests comprise three parts:
-- 1. Sanity checks and other three-operand tests (especially those
-- where the fused operation makes a difference)
-- 2. Multiply tests (third operand is neutral zero [0E+emax])
Expand Down Expand Up @@ -610,7 +610,7 @@ fmax2756 fma 1e-777777 -1e-411111 0E+999999 -> -0E-1000007 Underflow Subnorma
fmax2757 fma -1e-777777 1e-411111 0E+999999 -> -0E-1000007 Underflow Subnormal Inexact Rounded Clamped
fmax2758 fma -1e-777777 -1e-411111 0E+999999 -> 0E-1000007 Underflow Subnormal Inexact Rounded Clamped

-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
-- 'subnormal' boundary (all hard underflow or overflow in base arithmetic)
precision: 9
fmax2760 fma 1e-600000 1e-400001 0E+999999 -> 1E-1000001 Subnormal
fmax2761 fma 1e-600000 1e-400002 0E+999999 -> 1E-1000002 Subnormal
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/decimaltestdata/multiply.decTest
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ mulx756 multiply 1e-777777777 -1e-411111111 -> -0E-1000000007 Underflow Subnorm
mulx757 multiply -1e-777777777 1e-411111111 -> -0E-1000000007 Underflow Subnormal Inexact Rounded Clamped
mulx758 multiply -1e-777777777 -1e-411111111 -> 0E-1000000007 Underflow Subnormal Inexact Rounded Clamped

-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
-- 'subnormal' boundary (all hard underflow or overflow in base arithmetic)
precision: 9
mulx760 multiply 1e-600000000 1e-400000001 -> 1E-1000000001 Subnormal
mulx761 multiply 1e-600000000 1e-400000002 -> 1E-1000000002 Subnormal
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_binop.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def isnum(x):
return 0

def isRat(x):
"""Test wheter an object is an instance of the Rat class."""
"""Test whether an object is an instance of the Rat class."""
return isinstance(x, Rat)

class Rat(object):
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_functools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ def f(x, y):
self.assertEqual(mock_int.__hash__.call_count, 2)
self.assertEqual(f.cache_info(), (1, 1, 1, 1))

# Cache eviction: No use as an argument gives no additonal call
# Cache eviction: No use as an argument gives no additional call
self.assertEqual(f(6, 2), 20)
self.assertEqual(mock_int.__hash__.call_count, 2)
self.assertEqual(f.cache_info(), (1, 2, 1, 1))
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_importlib/import_/test___package__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class Using__package__:

"""Use of __package__ supercedes the use of __name__/__path__ to calculate
"""Use of __package__ supersedes the use of __name__/__path__ to calculate
what package a module belongs to. The basic algorithm is [__package__]::
def resolve_name(name, package, level):
Expand Down
14 changes: 7 additions & 7 deletions Lib/test/test_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -1598,19 +1598,19 @@ def test_internal_execvpe_str(self):
def test_execve_invalid_env(self):
args = [sys.executable, '-c', 'pass']

# null character in the enviroment variable name
# null character in the environment variable name
newenv = os.environ.copy()
newenv["FRUIT\0VEGETABLE"] = "cabbage"
with self.assertRaises(ValueError):
os.execve(args[0], args, newenv)

# null character in the enviroment variable value
# null character in the environment variable value
newenv = os.environ.copy()
newenv["FRUIT"] = "orange\0VEGETABLE=cabbage"
with self.assertRaises(ValueError):
os.execve(args[0], args, newenv)

# equal character in the enviroment variable name
# equal character in the environment variable name
newenv = os.environ.copy()
newenv["FRUIT=ORANGE"] = "lemon"
with self.assertRaises(ValueError):
Expand Down Expand Up @@ -2430,7 +2430,7 @@ def test_spawnve_noargs(self):
def _test_invalid_env(self, spawn):
args = [sys.executable, '-c', 'pass']

# null character in the enviroment variable name
# null character in the environment variable name
newenv = os.environ.copy()
newenv["FRUIT\0VEGETABLE"] = "cabbage"
try:
Expand All @@ -2440,7 +2440,7 @@ def _test_invalid_env(self, spawn):
else:
self.assertEqual(exitcode, 127)

# null character in the enviroment variable value
# null character in the environment variable value
newenv = os.environ.copy()
newenv["FRUIT"] = "orange\0VEGETABLE=cabbage"
try:
Expand All @@ -2450,7 +2450,7 @@ def _test_invalid_env(self, spawn):
else:
self.assertEqual(exitcode, 127)

# equal character in the enviroment variable name
# equal character in the environment variable name
newenv = os.environ.copy()
newenv["FRUIT=ORANGE"] = "lemon"
try:
Expand All @@ -2460,7 +2460,7 @@ def _test_invalid_env(self, spawn):
else:
self.assertEqual(exitcode, 127)

# equal character in the enviroment variable value
# equal character in the environment variable value
filename = support.TESTFN
self.addCleanup(support.unlink, filename)
with open(filename, "w") as fp:
Expand Down
8 changes: 4 additions & 4 deletions Lib/test/test_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,25 +668,25 @@ def test_invalid_cmd(self):
subprocess.Popen([sys.executable, "-c", "pass#\0"])

def test_invalid_env(self):
# null character in the enviroment variable name
# null character in the environment variable name
newenv = os.environ.copy()
newenv["FRUIT\0VEGETABLE"] = "cabbage"
with self.assertRaises(ValueError):
subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)

# null character in the enviroment variable value
# null character in the environment variable value
newenv = os.environ.copy()
newenv["FRUIT"] = "orange\0VEGETABLE=cabbage"
with self.assertRaises(ValueError):
subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)

# equal character in the enviroment variable name
# equal character in the environment variable name
newenv = os.environ.copy()
newenv["FRUIT=ORANGE"] = "lemon"
with self.assertRaises(ValueError):
subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)

# equal character in the enviroment variable value
# equal character in the environment variable value
newenv = os.environ.copy()
newenv["FRUIT"] = "orange=lemon"
with subprocess.Popen([sys.executable, "-c",
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_warnings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ def test_catch_warnings_defaults(self):
self.assertIs(wmod.filters, orig_filters)

def test_record_override_showwarning_before(self):
# Issue #28835: If warnings.showwarning() was overriden, make sure
# Issue #28835: If warnings.showwarning() was overridden, make sure
# that catch_warnings(record=True) overrides it again.
text = "This is a warning"
wmod = self.module
Expand Down
2 changes: 1 addition & 1 deletion Lib/unittest/test/testmock/testmagicmethods.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def test_magicmock(self):

for entry in _magics:
self.assertTrue(hasattr(mock, entry))
self.assertFalse(hasattr(mock, '__imaginery__'))
self.assertFalse(hasattr(mock, '__imaginary__'))


def test_magic_mock_equality(self):
Expand Down
Loading

0 comments on commit 49b2734

Please sign in to comment.