Skip to content

Commit

Permalink
#11565: Fix several typos. Patch by Piotr Kasprzyk.
Browse files Browse the repository at this point in the history
  • Loading branch information
ezio-melotti committed Mar 16, 2011
1 parent e3d09ff commit 1392500
Show file tree
Hide file tree
Showing 94 changed files with 126 additions and 126 deletions.
2 changes: 1 addition & 1 deletion Demo/turtle/tdemo_bytedesign.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
tdemo_bytedesign.py
An example adapted from the example-suite
of PythonCard's turtle graphcis.
of PythonCard's turtle graphics.
It's based on an article in BYTE magazine
Problem Solving with Logo: Using Turtle
Expand Down
2 changes: 1 addition & 1 deletion Doc/includes/sqlite3/shared_cache.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sqlite3

# The shared cache is only available in SQLite versions 3.3.3 or later
# See the SQLite documentaton for details.
# See the SQLite documentation for details.

sqlite3.enable_shared_cache(True)
4 changes: 2 additions & 2 deletions Include/abstract.h
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
arbitrary data.
0 is returned on success. buffer and buffer_len are only
set in case no error occurrs. Otherwise, -1 is returned and
set in case no error occurs. Otherwise, -1 is returned and
an exception set.
*/

Expand All @@ -480,7 +480,7 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
writable memory location in buffer of size buffer_len.
0 is returned on success. buffer and buffer_len are only
set in case no error occurrs. Otherwise, -1 is returned and
set in case no error occurs. Otherwise, -1 is returned and
an exception set.
*/

Expand Down
2 changes: 1 addition & 1 deletion Include/pymacconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# endif

# if defined(__LP64__)
/* MacOSX 10.4 (the first release to suppport 64-bit code
/* MacOSX 10.4 (the first release to support 64-bit code
* at all) only supports 64-bit in the UNIX layer.
* Therefore surpress the toolbox-glue in 64-bit mode.
*/
Expand Down
2 changes: 1 addition & 1 deletion Lib/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def _guess_delimiter(self, data, delimiters):
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/
Expand Down
2 changes: 1 addition & 1 deletion Lib/ctypes/test/test_arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_simple(self):
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)
Expand Down
2 changes: 1 addition & 1 deletion Lib/ctypes/test/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_get(self):
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)
Expand Down
2 changes: 1 addition & 1 deletion Lib/ctypes/test/test_numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def test_alignments(self):
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_)
Expand Down
2 changes: 1 addition & 1 deletion Lib/ctypes/test/test_win32.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_callconv_1(self):
# 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)
Expand Down
2 changes: 1 addition & 1 deletion Lib/difflib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1712,7 +1712,7 @@ def expand_tabs(line):
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')
Expand Down
2 changes: 1 addition & 1 deletion Lib/distutils/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def copy_tree(self, infile, outfile, preserve_mode=1, preserve_times=1,
not self.force, 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):
Expand Down
2 changes: 1 addition & 1 deletion Lib/distutils/cygwinccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def __init__(self, verbose=0, dry_run=0, force=0):
self.dll_libraries = get_msvcr()

def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
"""Compiles the source by spawing GCC and windres if needed."""
"""Compiles the source by spawning GCC and windres if needed."""
if ext == '.rc' or ext == '.res':
# gcc needs '.res' and '.rc' compiled to object files !!!
try:
Expand Down
2 changes: 1 addition & 1 deletion Lib/distutils/tests/test_clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_simple_run(self):
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()
Expand Down
2 changes: 1 addition & 1 deletion Lib/distutils/tests/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def test_user_site(self):
if sys.version < '2.6':
return

# preparing the environement for the test
# preparing the environment for the test
self.old_user_base = site.USER_BASE
self.old_user_site = site.USER_SITE
self.tmpdir = self.mkdtemp()
Expand Down
2 changes: 1 addition & 1 deletion Lib/distutils/tests/test_sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def test_get_file_list(self):
# 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()
Expand Down
4 changes: 2 additions & 2 deletions Lib/doctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ def __run(self, test, compileflags, out):
# 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)
Expand Down Expand Up @@ -2132,7 +2132,7 @@ def debug(self):
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',
Expand Down
2 changes: 1 addition & 1 deletion Lib/email/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
# 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]+:')

Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/FormatParagraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def format_paragraph_event(self, event):
# 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]:
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/extend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Lib/idlelib/macosxSupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ def runningAsOSXApp():

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:
Expand Down
2 changes: 1 addition & 1 deletion Lib/lib2to3/fixes/fix_metaclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Lib/lib2to3/pgen2/conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def run(self, graminit_h, graminit_c):
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
Expand Down Expand Up @@ -82,7 +82,7 @@ def parse_graminit_h(self, filename):
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:
Expand Down
4 changes: 2 additions & 2 deletions Lib/lib2to3/pytree.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,8 @@ def __init__(self, content=None, min=0, max=HUGE, name=None):
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
Expand Down
2 changes: 1 addition & 1 deletion Lib/lib2to3/tests/data/py2_test_grammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def testSimpleStmt(self):
### 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()

Expand Down
2 changes: 1 addition & 1 deletion Lib/lib2to3/tests/data/py3_test_grammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def testSimpleStmt(self):
### 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()

Expand Down
2 changes: 1 addition & 1 deletion Lib/ntpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,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 '^|<>='.

Expand Down
2 changes: 1 addition & 1 deletion Lib/pickletools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@ def __init__(self, name, code, arg,
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.
"""),
Expand Down
2 changes: 1 addition & 1 deletion Lib/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,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 as why:
#print 'Command %s failed: %s' % (cmd,why)
Expand Down
2 changes: 1 addition & 1 deletion Lib/pstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Stats:
"""

def __init__(self, *args, **kwds):
# I can't figure out how to explictly specify a stream keyword arg
# I can't figure out how to explicitly specify a stream keyword arg
# with *args:
# def __init__(self, *args, stream=sys.stdout): ...
# so I use **kwds and sqauwk if something unexpected is passed in.
Expand Down
2 changes: 1 addition & 1 deletion Lib/subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ def _execute_child(self, args, executable, preexec_fn, close_fds,
except pywintypes.error as 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:
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/pyclbr_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_capi.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def pendingcalls_thread(self, context):
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!
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -3120,7 +3120,7 @@ def checkinside(self, dt, tz, utc, dston, dstoff):
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
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_decimal.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def eval_file(self, file):
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
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_descr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3976,7 +3976,7 @@ def test_carloverre(self):
except TypeError:
pass
else:
self.fail("Carlo Verre __setattr__ suceeded!")
self.fail("Carlo Verre __setattr__ succeeded!")
try:
object.__delattr__(str, "lower")
except TypeError:
Expand Down
10 changes: 5 additions & 5 deletions Lib/test/test_doctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ def optionflags(): r"""
? + ++ ^
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):
Expand Down Expand Up @@ -1252,7 +1252,7 @@ def optionflags(): r"""
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
Expand Down Expand Up @@ -2199,7 +2199,7 @@ def test_testfile(): r"""
>>> doctest.master = None # Reset master.
(Note: we'll be clearing doctest.master after each call to
`doctest.testfile`, to supress warnings about multiple tests with the
`doctest.testfile`, to suppress warnings about multiple tests with the
same name.)
Globals may be specified with the `globs` and `extraglobs` parameters:
Expand Down Expand Up @@ -2235,7 +2235,7 @@ def test_testfile(): r"""
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:
Expand Down Expand Up @@ -2272,7 +2272,7 @@ def test_testfile(): r"""
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)
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_extcall.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
>>> Foo.method(1, *[2, 3])
5
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
Expand Down
Loading

0 comments on commit 1392500

Please sign in to comment.