Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either

comments, docstrings or error messages. I fixed two minor things in
test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't").

There is a minor style issue involved: Guido seems to have preferred English
grammar (behaviour, honour) in a couple places. This patch changes that to
American, which is the more prominent style in the source. I prefer English
myself, so if English is preferred, I'd be happy to supply a patch myself ;)
This commit is contained in:
Thomas Wouters 2000-07-16 12:04:32 +00:00
parent c533e4a012
commit 7e47402264
102 changed files with 184 additions and 184 deletions

View File

@ -43,7 +43,7 @@ def viewobj (r, s, t, mat) :
popmatrix()
#
# makeobj : the contructor of the object
# makeobj : the constructor of the object
#
def mkobj () :
v0 = (-5.0 ,0.0, 0.0)

View File

@ -15,10 +15,10 @@ def report(time, iframe):
print 'Frame', iframe, ': t =', time
def usage():
sys.stderr.write('usage: Vcopy [-t type] [-m treshold] [-a] infile outfile\n')
sys.stderr.write('usage: Vcopy [-t type] [-m threshold] [-a] infile outfile\n')
sys.stderr.write('-t Convert to other type\n')
sys.stderr.write('-a Automatic\n')
sys.stderr.write('-m Convert grey to mono with treshold\n')
sys.stderr.write('-m Convert grey to mono with threshold\n')
sys.stderr.write('-d Convert grey to mono with dithering\n')
sys.exit(2)

View File

@ -26,7 +26,7 @@ def usage():
print '-g bits : greyscale (2, 4 or 8 bits)'
print '-G : 2-bit greyscale dithered'
print '-m : monochrome dithered'
print '-M value : monochrome tresholded with value'
print '-M value : monochrome thresholded with value'
print '-f : Capture fields (in stead of frames)'
print '-P frames : preallocate space for "frames" frames'
print 'moviefile : here goes the movie data (default film.video)'

View File

@ -45,7 +45,7 @@ def usage():
print '-g bits : greyscale (2, 4 or 8 bits)'
print '-G : 2-bit greyscale dithered'
print '-m : monochrome dithered'
print '-M value : monochrome tresholded with value'
print '-M value : monochrome thresholded with value'
print '-f : Capture fields (instead of frames)'
print '-n number : Capture this many frames (default 60)'
print '-N memsize : Capture frames fitting in this many kbytes'

View File

@ -695,7 +695,7 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
DL_IMPORT(PyObject *) PySequence_Concat(PyObject *o1, PyObject *o2);
/*
Return the concatination of o1 and o2 on success, and NULL on
Return the concatenation of o1 and o2 on success, and NULL on
failure. This is the equivalent of the Python
expression: o1+o2.

View File

@ -71,7 +71,7 @@
*/
/* Basic fuctions to manipulate cStringIO objects from C */
/* Basic functions to manipulate cStringIO objects from C */
static struct PycStringIO_CAPI {

View File

@ -28,7 +28,7 @@ extern DL_IMPORT(PyTypeObject) PyCObject_Type;
#define PyCObject_Check(op) ((op)->ob_type == &PyCObject_Type)
/* Create a PyCObject from a pointer to a C object and an optional
destrutor function. If the second argument is non-null, then it
destructor function. If the second argument is non-null, then it
will be called with the first argument if and when the PyCObject is
destroyed.
@ -38,7 +38,7 @@ PyCObject_FromVoidPtr(void *cobj, void (*destruct)(void*));
/* Create a PyCObject from a pointer to a C object, a description object,
and an optional destrutor function. If the third argument is non-null,
and an optional destructor function. If the third argument is non-null,
then it will be called with the first and second arguments if and when
the PyCObject is destroyed.
*/

View File

@ -44,7 +44,7 @@ typedef BASE_TWODIGITS_TYPE stwodigits; /* signed variant of twodigits */
In a normalized number, ob_digit[abs(ob_size)-1] (the most significant
digit) is never zero. Also, in all cases, for all valid i,
0 <= ob_digit[i] <= MASK.
The allocation fuction takes care of allocating extra memory
The allocation function takes care of allocating extra memory
so that ob_digit[0] ... ob_digit[abs(ob_size)-1] are actually available. */
struct _longobject {

View File

@ -44,7 +44,7 @@ extern DL_IMPORT(PyObject *) Py_VaBuildValue(char *, va_list);
#define PYTHON_API_STRING "1009"
/* The API version is maintained (independently from the Python version)
so we can detect mismatches between the interpreter and dynamically
loaded modules. These are diagnosticised by an error message but
loaded modules. These are diagnosed by an error message but
the module is still loaded (because the mismatch can only be tested
after loading the module). The error message is intended to
explain the core dump a few seconds later.

View File

@ -51,7 +51,7 @@ and the type pointer. The actual memory allocated for an object
contains other data that can only be accessed after casting the pointer
to a pointer to a longer structure type. This longer type must start
with the reference count and type fields; the macro PyObject_HEAD should be
used for this (to accomodate for future changes). The implementation
used for this (to accommodate for future changes). The implementation
of a particular object type can cast the object pointer to the proper
type and back.
@ -326,7 +326,7 @@ The macros Py_INCREF(op) and Py_DECREF(op) are used to increment or decrement
reference counts. Py_DECREF calls the object's deallocator function; for
objects that don't contain references to other objects or heap memory
this can be the standard function free(). Both macros can be used
whereever a void expression is allowed. The argument shouldn't be a
wherever a void expression is allowed. The argument shouldn't be a
NIL pointer. The macro _Py_NewReference(op) is used only to initialize
reference counts to 1; it is defined here for convenience.
@ -518,7 +518,7 @@ times.
redefinition for better locality and less overhead.
Objects that want to be recursion safe need to use
the macroes
the macro's
Py_TRASHCAN_SAFE_BEGIN(name)
and
Py_TRASHCAN_SAFE_END(name)

View File

@ -493,7 +493,7 @@ extern DL_IMPORT(PyObject*) PyUnicode_AsUTF16String(
Note that Py_UNICODE data is being interpreted as UTF-16 reduced to
UCS-2. This trick makes it possible to add full UTF-16 capabilities
at a later point without comprimising the APIs.
at a later point without compromising the APIs.
*/
@ -815,7 +815,7 @@ extern DL_IMPORT(int) PyUnicode_Compare(
PyObject *right /* Right string */
);
/* Apply a argument tuple or dictionar to a format string and return
/* Apply a argument tuple or dictionary to a format string and return
the resulting Unicode string. */
extern DL_IMPORT(PyObject *) PyUnicode_Format(

View File

@ -4,7 +4,7 @@ class UserList:
def __init__(self, initlist=None):
self.data = []
if initlist is not None:
# XXX should this accept an arbitary sequence?
# XXX should this accept an arbitrary sequence?
if type(initlist) == type(self.data):
self.data[:] = initlist
elif isinstance(initlist, UserList):

View File

@ -82,7 +82,7 @@ This returns an instance of a class with the following public methods:
close() -- close the instance (make it unusable)
The position returned by tell(), the position given to setpos() and
the position of marks are all compatible and have nothing to do with
the actual postion in the file.
the actual position in the file.
The close() method is called automatically when the class instance
is destroyed.

View File

@ -287,7 +287,7 @@ class fifo:
## return result
# yes, this is about twice as fast, but still seems
# to be neglible CPU. The previous could do about 290
# to be negligible CPU. The previous could do about 290
# searches/sec. the new one about 555/sec.
import regex

View File

@ -75,7 +75,7 @@ if os.name == 'mac':
else:
#
# Glue code for non-macintosh useage
# Glue code for non-macintosh usage
#
class FInfo:

View File

@ -83,7 +83,7 @@ of FieldStorage (or MiniFieldStorage, depending on the form encoding).
If the submitted form data contains more than one field with the same
name, the object retrieved by form[key] is not a (Mini)FieldStorage
instance but a list of such instances. If you are expecting this
possibility (i.e., when your HTML form comtains multiple fields with
possibility (i.e., when your HTML form contains multiple fields with
the same name), use the type() function to determine whether you have
a single instance or a list of instances. For example, here's code
that concatenates any number of username fields, separated by commas:
@ -106,7 +106,7 @@ that concatenates any number of username fields, separated by commas:
If a field represents an uploaded file, the value attribute reads the
entire file in memory as a string. This may not be what you want. You can
test for an uploaded file by testing either the filename attribute or the
file attribute. You can then read the data at leasure from the file
file attribute. You can then read the data at leisure from the file
attribute:
fileitem = form["userfile"]
@ -500,7 +500,7 @@ def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0):
keep_blank_values: flag indicating whether blank values in
URL encoded forms should be treated as blank strings.
A true value inicates that blanks should be retained as
A true value indicates that blanks should be retained as
blank strings. The default false value indicates that
blank values are to be ignored and treated as if they were
not included.
@ -551,7 +551,7 @@ def parse_qs(qs, keep_blank_values=0, strict_parsing=0):
keep_blank_values: flag indicating whether blank values in
URL encoded queries should be treated as blank strings.
A true value inicates that blanks should be retained as
A true value indicates that blanks should be retained as
blank strings. The default false value indicates that
blank values are to be ignored and treated as if they were
not included.
@ -578,7 +578,7 @@ def parse_qsl(qs, keep_blank_values=0, strict_parsing=0):
keep_blank_values: flag indicating whether blank values in
URL encoded queries should be treated as blank strings.
A true value inicates that blanks should be retained as
A true value indicates that blanks should be retained as
blank strings. The default false value indicates that
blank values are to be ignored and treated as if they were
not included.
@ -806,7 +806,7 @@ class FieldStorage:
keep_blank_values: flag indicating whether blank values in
URL encoded forms should be treated as blank strings.
A true value inicates that blanks should be retained as
A true value indicates that blanks should be retained as
blank strings. The default false value indicates that
blank values are to be ignored and treated as if they were
not included.

View File

@ -273,7 +273,7 @@ class StreamReader(Codec):
""" Resets the codec buffers used for keeping state.
Note that no stream repositioning should take place.
This method is primarely intended to be able to recover
This method is primarily intended to be able to recover
from decoding errors.
"""
@ -295,7 +295,7 @@ class StreamReaderWriter:
work in both read and write modes.
The design is such that one can use the factory functions
returned by the codec.lookup() function to contruct the
returned by the codec.lookup() function to construct the
instance.
"""

View File

@ -21,7 +21,7 @@ fp.pop()
The latter sequence may be used recursively at (A).
It is also allowed to use multiple push()...pop() sequences.
If seekable is given as 0, the class code will not do the bookeeping
If seekable is given as 0, the class code will not do the bookkeeping
it normally attempts in order to make seeks relative to the beginning of the
current file part. This may be useful when using MultiFile with a non-
seekable stream object.

View File

@ -84,7 +84,7 @@ class Completer:
"""Compute matches when text contains a dot.
Assuming the text is of the form NAME.NAME....[NAME], and is
evaluabable in the globals of __main__, it will be evaluated
evaluatable in the globals of __main__, it will be evaluated
and its attributes (as revealed by dir()) are used as possible
completions. (For class instances, class members are are also
considered.)

View File

@ -20,7 +20,7 @@ for WORDSIZE in "BHil":
if len(array.array(WORDSIZE, [0]).tostring()) == _sre.getcodesize():
break
else:
raise RuntimeError, "cannot find a useable array type"
raise RuntimeError, "cannot find a usable array type"
def _compile(code, pattern, flags):
# internal: compile a (sub)pattern

View File

@ -118,7 +118,7 @@ def join(words, sep = ' '):
"""join(list [,sep]) -> string
Return a string composed of the words in list, with
intervening occurences of sep. The default separator is a
intervening occurrences of sep. The default separator is a
single space.
(joinfields and join are synonymous)

View File

@ -62,7 +62,7 @@ def main(use_rgbimg=1):
image = imageop.grey2rgb(greyimage, width, height)
# Convert a 8-bit deep greyscale image to a 1-bit deep image by
# tresholding all the pixels. The resulting image is tightly packed
# thresholding all the pixels. The resulting image is tightly packed
# and is probably only useful as an argument to mono2grey.
if verbose:
print 'grey2mono'

View File

@ -1,7 +1,7 @@
import thread
# Start empty thread to initialise thread mechanics (and global lock!)
# Start empty thread to initialize thread mechanics (and global lock!)
# This thread will finish immediately thus won't make much influence on
# test results by itself, only by that fact that it initialises global lock
# test results by itself, only by that fact that it initializes global lock
thread.start_new_thread(lambda : 1, ())
import test.pystone

View File

@ -117,7 +117,7 @@ def format_exception(etype, value, tb, limit = None):
have the same meaning as the corresponding arguments to
print_exception(). The return value is a list of strings, each
ending in a newline and some containing internal newlines. When
these lines are contatenated and printed, exactly the same text is
these lines are concatenated and printed, exactly the same text is
printed as does print_exception()."""
if tb:
list = ['Traceback (most recent call last):\n']

View File

@ -4,7 +4,7 @@ class UserList:
def __init__(self, initlist=None):
self.data = []
if initlist is not None:
# XXX should this accept an arbitary sequence?
# XXX should this accept an arbitrary sequence?
if type(initlist) == type(self.data):
self.data[:] = initlist
elif isinstance(initlist, UserList):

View File

@ -120,10 +120,10 @@ decoding_map = {
0x00d0: None, # UNDEFINED
0x00d1: None, # UNDEFINED
0x00d2: None, # UNDEFINED
0x00d3: None, # UNDEFINEDS
0x00d3: None, # UNDEFINED
0x00d4: None, # UNDEFINED
0x00d5: None, # UNDEFINED
0x00d6: None, # UNDEFINEDE
0x00d6: None, # UNDEFINED
0x00d7: None, # UNDEFINED
0x00d8: None, # UNDEFINED
0x00d9: 0x2518, # BOX DRAWINGS LIGHT UP AND LEFT

View File

@ -56,7 +56,7 @@ class Para:
#
# Tab to a given position (relative to the current left indent):
# remove all stretch, add fixed space up to the new indent.
# If the current position is already beying the tab stop,
# If the current position is already at the tab stop,
# don't add any new space (but still remove the stretch)
def tabto(self, tab):
total = 0

View File

@ -64,7 +64,7 @@ assignments to sys.path).
(2) A package's *import domain*, contained in the per-package variable
__domain__, defines a list of *packages* that are searched (using
their respective module search paths) to satisfy imports. It is
initialized to the list cosisting of the package itself, its parent
initialized to the list consisting of the package itself, its parent
package, its parent's parent, and so on, ending with the root package
(the nameless package containing all top-level packages and modules,
whose module search path is None, implying sys.path).

View File

@ -36,7 +36,7 @@ class FileDialog:
and pattern arguments, overriding the values passed in (it does
not keep track of the default argument!). If no key is specified,
the dialog keeps no memory of previous state. Note that memory is
kept even when the dialog is cancelled. (All this emulates the
kept even when the dialog is canceled. (All this emulates the
behavior of the Macintosh file selection dialogs.)
"""

View File

@ -277,7 +277,7 @@ class Tester:
return self
def dnd_enter(self, source, event):
self.canvas.focus_set() # Show higlight border
self.canvas.focus_set() # Show highlight border
x, y = source.where(self.canvas, event)
x1, y1, x2, y2 = source.canvas.bbox(source.id)
dx, dy = x2-x1, y2-y1

View File

@ -117,7 +117,7 @@ class Event:
Enter, KeyPress, KeyRelease,
Leave, Motion)
state - state as a string (Visibility)
time - when the event occured
time - when the event occurred
x - x-position of the mouse
y - y-position of the mouse
x_root - x-position of the mouse on the screen
@ -129,7 +129,7 @@ class Event:
keysym - keysym of the the event as a string (KeyPress, KeyRelease)
keysym_num - keysym of the event as a number (KeyPress, KeyRelease)
type - type of the event as a number
widget - widget in which the event occured
widget - widget in which the event occurred
delta - delta of wheel movement (MouseWheel)
"""
pass
@ -409,7 +409,7 @@ class Misc:
The focus order first goes to the next child, then to
the children of the child recursively and then to the
next sibling which is higher in the stacking order. A
widget is ommited if it has the takefocus resource set
widget is omitted if it has the takefocus resource set
to 0."""
name = self.tk.call('tk_focusNext', self._w)
if not name: return None
@ -529,7 +529,7 @@ class Misc:
def option_readfile(self, fileName, priority = None):
"""Read file FILENAME into the option database.
An optional second paramter gives the numeric
An optional second parameter gives the numeric
priority."""
self.tk.call('option', 'readfile', fileName, priority)
def selection_clear(self, **kw):
@ -639,7 +639,7 @@ class Misc:
"""Return geometry string for this widget in the form "widthxheight+X+Y"."""
return self.tk.call('winfo', 'geometry', self._w)
def winfo_height(self):
"""Return heigth of this widget."""
"""Return height of this widget."""
return getint(
self.tk.call('winfo', 'height', self._w))
def winfo_id(self):
@ -754,7 +754,7 @@ class Misc:
return self._nametowidget(self.tk.call(
'winfo', 'toplevel', self._w))
def winfo_viewable(self):
"""Return true if the widget and all its higher anchestors are mapped."""
"""Return true if the widget and all its higher ancestors are mapped."""
return getint(
self.tk.call('winfo', 'viewable', self._w))
def winfo_visual(self):
@ -1135,7 +1135,7 @@ class Misc:
cell. If COL2 and ROW2 are given the bounding box
starts at that cell.
The returned integers specify the offset of the uppler left
The returned integers specify the offset of the upper left
corner in the master widget and the width and height.
"""
args = ('grid', 'bbox', self._w)
@ -1268,7 +1268,7 @@ class Misc:
class CallWrapper:
"""Internal class. Stores function to call when some user
defined Tcl function is called e.g. after an event occured."""
defined Tcl function is called e.g. after an event occurred."""
def __init__(self, func, subst, widget):
"""Store FUNC, SUBST and WIDGET as members."""
self.func = func
@ -1316,7 +1316,7 @@ class Wm:
def wm_command(self, value=None):
"""Store VALUE in WM_COMMAND property. It is the command
which shall be used to invoke the application. Return current
commmand if VALUE is None."""
command if VALUE is None."""
return self.tk.call('wm', 'command', self._w, value)
command = wm_command
def wm_deiconify(self):
@ -1335,7 +1335,7 @@ class Wm:
return self.tk.call('wm', 'frame', self._w)
frame = wm_frame
def wm_geometry(self, newGeometry=None):
"""Set geometry to NEWGEOMETRY of the form =widthxheigth+x+y. Return
"""Set geometry to NEWGEOMETRY of the form =widthxheight+x+y. Return
current value if None is given."""
return self.tk.call('wm', 'geometry', self._w, newGeometry)
geometry = wm_geometry
@ -1623,7 +1623,7 @@ class Place:
relative to width of master (1.0 is the same width
as the master)
relheight=amount - height of this widget between 0.0 and 1.0
relative to heigth of master (1.0 is the same
relative to height of master (1.0 is the same
height as the master)
bordermode="inside" or "outside" - whether to take border width of master widget
into account
@ -1913,12 +1913,12 @@ class Canvas(Widget):
sequence, func, add)
def canvasx(self, screenx, gridspacing=None):
"""Return the canvas x coordinate of pixel position SCREENX rounded
to nearest muliple of GRIDSPACING units."""
to nearest multiple of GRIDSPACING units."""
return getdouble(self.tk.call(
self._w, 'canvasx', screenx, gridspacing))
def canvasy(self, screeny, gridspacing=None):
"""Return the canvas y coordinate of pixel position SCREENY rounded
to nearest muliple of GRIDSPACING units."""
to nearest multiple of GRIDSPACING units."""
return getdouble(self.tk.call(
self._w, 'canvasy', screeny, gridspacing))
def coords(self, *args):
@ -2609,7 +2609,7 @@ class Text(Widget):
width, wrap, xscrollcommand, yscrollcommand."""
Widget.__init__(self, master, 'text', cnf, kw)
def bbox(self, *args):
"""Return a tuple of (x,y,width,heigth) which gives the bounding
"""Return a tuple of (x,y,width,height) which gives the bounding
box of the visible part of the character at the index in ARGS."""
return self._getints(
self.tk.call((self._w, 'bbox') + args)) or None
@ -2674,7 +2674,7 @@ class Text(Widget):
"""Return the index in the form line.char for INDEX."""
return self.tk.call(self._w, 'index', index)
def insert(self, index, chars, *args):
"""Insert CHARS before the charaters at INDEX. An additional
"""Insert CHARS before the characters at INDEX. An additional
tag can be given in ARGS. Additional CHARS and tags can follow in ARGS."""
self.tk.call((self._w, 'insert', index, chars) + args)
def mark_gravity(self, markName, direction=None):
@ -2728,7 +2728,7 @@ class Text(Widget):
self.tk.call(self._w, 'see', index)
def tag_add(self, tagName, index1, *args):
"""Add tag TAGNAME to all characters between INDEX1 and index2 in ARGS.
Addtional pairs of indices may follow in ARGS."""
Additional pairs of indices may follow in ARGS."""
self.tk.call(
(self._w, 'tag', 'add', tagName, index1) + args)
def tag_unbind(self, tagName, sequence, funcid=None):

View File

@ -48,7 +48,7 @@ class Chooser(Dialog):
# to simplify application code, the color chooser returns
# an RGB tuple together with the Tk color string
if not result:
return None, None # cancelled
return None, None # canceled
r, g, b = widget.winfo_rgb(result)
return (r/256, g/256, b/256), result

View File

@ -268,7 +268,7 @@ def getdefaultlocale(envvars=('LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG')):
setlocale(LC_ALL, "") runs using the portable 'C' locale.
Calling setlocale(LC_ALL, "") lets it use the default locale as
defined by the LANG variable. Since we don't want to interfere
with the current locale setting we thus emulate the behaviour
with the current locale setting we thus emulate the behavior
in the way described above.
To maintain compatibility with other platforms, not only the

View File

@ -627,7 +627,7 @@ class Folder:
pass
def removefromallsequences(self, list):
"""Remove one or more messages from all sequeuces (including last)
"""Remove one or more messages from all sequences (including last)
-- but not from 'cur'!!!"""
if hasattr(self, 'last') and self.last in list:
del self.last

View File

@ -21,7 +21,7 @@ fp.pop()
The latter sequence may be used recursively at (A).
It is also allowed to use multiple push()...pop() sequences.
If seekable is given as 0, the class code will not do the bookeeping
If seekable is given as 0, the class code will not do the bookkeeping
it normally attempts in order to make seeks relative to the beginning of the
current file part. This may be useful when using MultiFile with a non-
seekable stream object.

View File

@ -219,7 +219,7 @@ class NNTP:
- date: string 'yymmdd' indicating the date
- time: string 'hhmmss' indicating the time
Return:
- resp: server response if succesful
- resp: server response if successful
- list: list of newsgroup names"""
return self.longcmd('NEWGROUPS ' + date + ' ' + time)
@ -230,7 +230,7 @@ class NNTP:
- date: string 'yymmdd' indicating the date
- time: string 'hhmmss' indicating the time
Return:
- resp: server response if succesful
- resp: server response if successful
- list: list of article ids"""
cmd = 'NEWNEWS ' + group + ' ' + date + ' ' + time
@ -238,7 +238,7 @@ class NNTP:
def list(self):
"""Process a LIST command. Return:
- resp: server response if succesful
- resp: server response if successful
- list: list of (group, last, first, flag) (strings)"""
resp, list = self.longcmd('LIST')
@ -251,7 +251,7 @@ class NNTP:
"""Process a GROUP command. Argument:
- group: the group name
Returns:
- resp: server response if succesful
- resp: server response if successful
- count: number of articles (string)
- first: first article number (string)
- last: last article number (string)
@ -275,7 +275,7 @@ class NNTP:
def help(self):
"""Process a HELP command. Returns:
- resp: server response if succesful
- resp: server response if successful
- list: list of strings"""
return self.longcmd('HELP')
@ -303,7 +303,7 @@ class NNTP:
"""Process a STAT command. Argument:
- id: article number or message id
Returns:
- resp: server response if succesful
- resp: server response if successful
- nr: the article number
- id: the article id"""
@ -327,7 +327,7 @@ class NNTP:
"""Process a HEAD command. Argument:
- id: article number or message id
Returns:
- resp: server response if succesful
- resp: server response if successful
- nr: article number
- id: message id
- list: the lines of the article's header"""
@ -338,7 +338,7 @@ class NNTP:
"""Process a BODY command. Argument:
- id: article number or message id
Returns:
- resp: server response if succesful
- resp: server response if successful
- nr: article number
- id: message id
- list: the lines of the article's body"""
@ -349,7 +349,7 @@ class NNTP:
"""Process an ARTICLE command. Argument:
- id: article number or message id
Returns:
- resp: server response if succesful
- resp: server response if successful
- nr: article number
- id: message id
- list: the lines of the article"""
@ -358,7 +358,7 @@ class NNTP:
def slave(self):
"""Process a SLAVE command. Returns:
- resp: server response if succesful"""
- resp: server response if successful"""
return self.shortcmd('SLAVE')
@ -367,7 +367,7 @@ class NNTP:
- hdr: the header type (e.g. 'subject')
- str: an article nr, a message id, or a range nr1-nr2
Returns:
- resp: server response if succesful
- resp: server response if successful
- list: list of (nr, value) strings"""
pat = re.compile('^([0-9]+) ?(.*)\n?')
@ -384,7 +384,7 @@ class NNTP:
- start: start of range
- end: end of range
Returns:
- resp: server response if succesful
- resp: server response if successful
- list: list of (art-nr, subject, poster, date,
id, references, size, lines)"""
@ -409,7 +409,7 @@ class NNTP:
"""Process an XGTITLE command (optional server extension) Arguments:
- group: group name wildcard (i.e. news.*)
Returns:
- resp: server response if succesful
- resp: server response if successful
- list: list of (name,title) strings"""
line_pat = re.compile("^([^ \t]+)[ \t]+(.*)$")
@ -425,7 +425,7 @@ class NNTP:
"""Process an XPATH command (optional server extension) Arguments:
- id: Message id of article
Returns:
resp: server response if succesful
resp: server response if successful
path: directory path to article"""
resp = self.shortcmd("XPATH " + id)
@ -442,7 +442,7 @@ class NNTP:
"""Process the DATE command. Arguments:
None
Returns:
resp: server response if succesful
resp: server response if successful
date: Date suitable for newnews/newgroups commands etc.
time: Time suitable for newnews/newgroups commands etc."""
@ -463,7 +463,7 @@ class NNTP:
"""Process a POST command. Arguments:
- f: file containing the article
Returns:
- resp: server response if succesful"""
- resp: server response if successful"""
resp = self.shortcmd('POST')
# Raises error_??? if posting is not allowed
@ -486,7 +486,7 @@ class NNTP:
- id: message-id of the article
- f: file containing the article
Returns:
- resp: server response if succesful
- resp: server response if successful
Note that if the server refuses the article an exception is raised."""
resp = self.shortcmd('IHAVE ' + id)
@ -507,7 +507,7 @@ class NNTP:
def quit(self):
"""Process a QUIT command and close the socket. Returns:
- resp: server response if succesful"""
- resp: server response if successful"""
resp = self.shortcmd('QUIT')
self.file.close()

View File

@ -218,7 +218,7 @@ def execvp(file, args):
Execute the executable file (which is searched for along $PATH)
with argument list args, replacing the current process.
args may be a list or tupe of strings. """
args may be a list or tuple of strings. """
_execvpe(file, args)
def execvpe(file, args, env):
@ -227,7 +227,7 @@ def execvpe(file, args, env):
Execute the executable file (which is searched for along $PATH)
with argument list args and environment env , replacing the
current process.
args may be a list or tupe of strings. """
args may be a list or tuple of strings. """
_execvpe(file, args, env)
_notfound = None

View File

@ -191,7 +191,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
if bp:
bp.bpprint()
return
# parse arguments; comma has lowest precendence
# parse arguments; comma has lowest precedence
# and cannot occur in filename
filename = None
lineno = None

View File

@ -59,7 +59,7 @@ class POP3:
POP3(hostname, port=110)
NB: the POP protocol locks the mailbox from user
authorisation until QUIT, so be sure to get in, suck
authorization until QUIT, so be sure to get in, suck
the messages, and quit, each time you access the
mailbox.

View File

@ -4,7 +4,7 @@
# This is a simple little module I wrote to make life easier. I didn't
# see anything quite like it in the library, though I may have overlooked
# something. I wrote this when I was trying to read some heavily nested
# tuples with fairly non-descriptive content. This is modelled very much
# tuples with fairly non-descriptive content. This is modeled very much
# after Lisp/Scheme - style pretty-printing of lists. If you find it
# useful, thank small children who sleep at night.

View File

@ -77,7 +77,7 @@ Some of the functions in this module takes flags as optional parameters:
M MULTILINE "^" matches the beginning of lines as well as the string.
"$" matches the end of lines as well as the string.
S DOTALL "." matches any character at all, including the newline.
X VERBOSE Ignore whitespaces and comments for nicer looking RE's.
X VERBOSE Ignore whitespace and comments for nicer looking RE's.
This module also defines an exception 'error'.

View File

@ -98,9 +98,9 @@ class Profile:
subfunctions
[ 2] = Cumulative time spent in this frame's function, including time in
all subfunctions to this frame.
[-3] = Name of the function that corresonds to this frame.
[-3] = Name of the function that corresponds to this frame.
[-2] = Actual frame that we correspond to (used to sync exception handling)
[-1] = Our parent 6-tuple (corresonds to frame.f_back)
[-1] = Our parent 6-tuple (corresponds to frame.f_back)
Timing data for each function is stored as a 5-tuple in the dictionary
self.timings[]. The index is always the name stored in self.cur[4].
@ -205,7 +205,7 @@ class Profile:
return
# SLOW generic dispatch rountine for timer returning lists of numbers
# SLOW generic dispatch routine for timer returning lists of numbers
def trace_dispatch_l(self, frame, event, arg):
t = self.get_time() - self.t
@ -368,7 +368,7 @@ class Profile:
#******************************************************************
# The following calculates the overhead for using a profiler. The
# problem is that it takes a fair amount of time for the profiler
# to stop the stopwatch (from the time it recieves an event).
# to stop the stopwatch (from the time it receives an event).
# Similarly, there is a delay from the time that the profiler
# re-starts the stopwatch before the user's code really gets to
# continue. The following code tries to measure the difference on

View File

@ -49,16 +49,16 @@ class Stats:
The big change from the previous Profiler (in terms of raw functionality)
is that an "add()" method has been provided to combine Stats from
several distinct profile runs. Both the constructor and the add()
method now take arbitrarilly many file names as arguments.
method now take arbitrarily many file names as arguments.
All the print methods now take an argument that indicats how many lines
All the print methods now take an argument that indicates how many lines
to print. If the arg is a floating point number between 0 and 1.0, then
it is taken as a decimal percentage of the availabel lines to be printed
it is taken as a decimal percentage of the available lines to be printed
(e.g., .1 means print 10% of all available lines). If it is an integer,
it is taken to mean the number of lines of data that you wish to have
printed.
The sort_stats() method now processes some additionaly options (i.e., in
The sort_stats() method now processes some additional options (i.e., in
addition to the old -1, 0, 1, or 2). It takes an arbitrary number of quoted
strings to select the sort order. For example sort_stats('time', 'name')
sorts on the major key of "internal function time", and on the minor
@ -165,7 +165,7 @@ class Stats:
# list the tuple indicies and directions for sorting,
# list the tuple indices and directions for sorting,
# along with some printable description
sort_arg_dict_default = {\
"calls" : (((1,-1), ), "call count"),\
@ -447,7 +447,7 @@ class Stats:
class TupleComp:
"""This class provides a generic function for comparing any two tuples.
Each instance records a list of tuple-indicies (from most significant
Each instance records a list of tuple-indices (from most significant
to least significant), and sort direction (ascending or decending) for
each tuple-index. The compare functions can then be used as the function
argument to the system sort() function when a list of tuples need to be

View File

@ -193,7 +193,7 @@ class Message:
You may override this method if your application wants
to bend the rules, e.g. to strip trailing whitespace,
or to recognise MH template separators ('--------').
or to recognize MH template separators ('--------').
For convenience (e.g. for code reading from sockets) a
line consisting of \r\n also matches.
"""

View File

@ -84,7 +84,7 @@ class Completer:
"""Compute matches when text contains a dot.
Assuming the text is of the form NAME.NAME....[NAME], and is
evaluabable in the globals of __main__, it will be evaluated
evaluatable in the globals of __main__, it will be evaluated
and its attributes (as revealed by dir()) are used as possible
completions. (For class instances, class members are are also
considered.)

View File

@ -88,7 +88,7 @@ class SMTPSenderRefused(SMTPResponseException):
class SMTPRecipientsRefused(SMTPException):
"""All recipient addresses refused.
The errors for each recipient are accessable thru the attribute
The errors for each recipient are accessible through the attribute
'recipients', which is a dictionary of exactly the same sort as
SMTP.sendmail() returns.
"""
@ -323,7 +323,7 @@ class SMTP:
if code<>250:
return (code,msg)
self.does_esmtp=1
#parse the ehlo responce -ddm
#parse the ehlo response -ddm
resp=string.split(self.ehlo_resp,'\n')
del resp[0]
for each in resp:

View File

@ -172,7 +172,7 @@ CH_UNICODE = {
# flags
SRE_FLAG_TEMPLATE = 1 # template mode (disable backtracking)
SRE_FLAG_IGNORECASE = 2 # case insensitive
SRE_FLAG_LOCALE = 4 # honour system locale
SRE_FLAG_LOCALE = 4 # honor system locale
SRE_FLAG_MULTILINE = 8 # treat target as multiline string
SRE_FLAG_DOTALL = 16 # treat target as a single string
SRE_FLAG_UNICODE = 32 # use unicode locale

View File

@ -116,7 +116,7 @@ def join(words, sep = ' '):
"""join(list [,sep]) -> string
Return a string composed of the words in list, with
intervening occurences of sep. The default separator is a
intervening occurrences of sep. The default separator is a
single space.
(joinfields and join are synonymous)

View File

@ -118,7 +118,7 @@ def join(words, sep = ' '):
"""join(list [,sep]) -> string
Return a string composed of the words in list, with
intervening occurences of sep. The default separator is a
intervening occurrences of sep. The default separator is a
single space.
(joinfields and join are synonymous)

View File

@ -63,7 +63,7 @@ This returns an instance of a class with the following public methods:
tell() -- return the current position
close() -- close the instance (make it unusable)
The position returned by tell() and the position given to setpos()
are compatible and have nothing to do with the actual postion in the
are compatible and have nothing to do with the actual position in the
file.
The close() method is called automatically when the class instance
is destroyed.
@ -170,7 +170,7 @@ class Au_read:
if self._hdr_size < 24:
raise Error, 'header size too small'
if self._hdr_size > 100:
raise Error, 'header size rediculously large'
raise Error, 'header size ridiculously large'
self._data_size = _read_u32(file)
if self._data_size != AUDIO_UNKNOWN_SIZE:
self._data_size = int(self._data_size)

View File

@ -42,7 +42,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0,
exclude=0, single=0, randomize=0):
"""Execute a test suite.
This also parses command-line options and modifies its behaviour
This also parses command-line options and modifies its behavior
accordingly.
tests -- a list of strings containing test names (optional)

View File

@ -62,7 +62,7 @@ def main(use_rgbimg=1):
image = imageop.grey2rgb(greyimage, width, height)
# Convert a 8-bit deep greyscale image to a 1-bit deep image by
# tresholding all the pixels. The resulting image is tightly packed
# thresholding all the pixels. The resulting image is tightly packed
# and is probably only useful as an argument to mono2grey.
if verbose:
print 'grey2mono'

View File

@ -66,7 +66,7 @@ if pid == pty.CHILD:
pass
except:
# We don't want this error to propagate, escape the call to
# os._exit(), and cause very peculiar behaviour in the calling
# os._exit(), and cause very peculiar behavior in the calling
# regrtest.py !
debug("Some other error was raised.")
os._exit(1)

View File

@ -58,7 +58,7 @@ def WriteTestData(root_key):
def ReadTestData(root_key):
# Check we can get default value for this key.
val = QueryValue(root_key, test_key_name)
assert val=="Default value", "Registry didnt give back the correct value"
assert val=="Default value", "Registry didn't give back the correct value"
key = OpenKey(root_key, test_key_name)
# Read the sub-keys
@ -70,9 +70,9 @@ def ReadTestData(root_key):
data = EnumValue(sub_key, index)
except EnvironmentError:
break
assert data in test_data, "didnt read back the correct test data."
assert data in test_data, "Didn't read back the correct test data"
index = index + 1
assert index==len(test_data), "Didnt read the correct number of items"
assert index==len(test_data), "Didn't read the correct number of items"
# Check I can directly access each item
for value_name, value_data, value_type in test_data:
read_val, read_typ = QueryValueEx(sub_key, value_name)

View File

@ -76,7 +76,7 @@ def _toaiff(filename, temps):
temps.append(fname)
sts = uncompress.copy(filename, fname)
if sts:
raise error, filename + ': uncomress failed'
raise error, filename + ': uncompress failed'
else:
fname = filename
try:

View File

@ -117,7 +117,7 @@ def format_exception(etype, value, tb, limit = None):
have the same meaning as the corresponding arguments to
print_exception(). The return value is a list of strings, each
ending in a newline and some containing internal newlines. When
these lines are contatenated and printed, exactly the same text is
these lines are concatenated and printed, exactly the same text is
printed as does print_exception()."""
if tb:
list = ['Traceback (most recent call last):\n']

View File

@ -773,7 +773,7 @@ def basejoin(base, url):
# just return it
return url
host, basepath = splithost(basepath) # inherit host
basepath, basetag = splittag(basepath) # remove extraneuous cruft
basepath, basetag = splittag(basepath) # remove extraneous cruft
basepath, basequery = splitquery(basepath) # idem
if path[:1] != '/':
# non-absolute path name

View File

@ -456,7 +456,7 @@ class HTTPRedirectHandler(BaseHandler):
http_error_301 = http_error_302
inf_msg = "The HTTP server returned a redirect error that would" \
"lead to an inifinte loop.\n" \
"lead to an infinite loop.\n" \
"The last 302 error message was:\n"
class ProxyHandler(BaseHandler):

View File

@ -30,7 +30,7 @@ This returns an instance of a class with the following public methods:
tell() -- return the current position
close() -- close the instance (make it unusable)
The position returned by tell() and the position given to setpos()
are compatible and have nothing to do with the actual postion in the
are compatible and have nothing to do with the actual position in the
file.
The close() method is called automatically when the class instance
is destroyed.

View File

@ -50,7 +50,7 @@ class XMLReader:
def setLocale(self, locale):
"""Allow an application to set the locale for errors and warnings.
SAX parsers are not required to provide localisation for errors
SAX parsers are not required to provide localization for errors
and warnings; if they cannot support the requested locale,
however, they must throw a SAX exception. Applications may
request a locale change in the middle of a parse."""

View File

@ -143,7 +143,7 @@ class XMLParser:
self.__seen_starttag = 0
self.__use_namespaces = 0
self.__namespaces = {'xml':None} # xml is implicitly declared
# backward compatipibility hack: if elements not overridden,
# backward compatibility hack: if elements not overridden,
# fill it in ourselves
if self.elements is XMLParser.elements:
self.__fixelements()

View File

@ -57,7 +57,7 @@ static char cStringIO_module_documentation[] =
"This module provides a simple useful replacement for\n"
"the StringIO module that is written in C. It does not provide the\n"
"full generality of StringIO, but it provides enough for most\n"
"applications and is especially useful in conjuction with the\n"
"applications and is especially useful in conjunction with the\n"
"pickle module.\n"
"\n"
"Usage:\n"

View File

@ -22,7 +22,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
* fine but a program with two threads using forms will probably crash (unless
* the program takes precaution to ensure that only one thread can be in
* this module at any time). This will have to be fixed some time.
* (A fix will probably also have to synchronise with the gl module).
* (A fix will probably also have to synchronize with the gl module).
*/
#include "Python.h"

View File

@ -92,7 +92,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
* That's it!
*
* Well, almost. Once we have determined prefix and exec_prefix, the
* preprocesor variable PYTHONPATH is used to construct a path. Each
* preprocessor variable PYTHONPATH is used to construct a path. Each
* relative path on PYTHONPATH is prefixed with prefix. Then the directory
* containing the shared library modules is appended. The environment
* variable $PYTHONPATH is inserted in front of it all. Finally, the

View File

@ -10,7 +10,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
/* IMGFILE module - Interface to sgi libimage */
/* XXX This modele should be done better at some point. It should return
/* XXX This module should be done better at some point. It should return
** an object of image file class, and have routines to manipulate these
** image files in a neater way (so you can get rgb images off a greyscale
** file, for instance, or do a straight display without having to get the

View File

@ -143,7 +143,7 @@ MD5Update(MD5_CTX *context, unsigned char *input, unsigned int inputLen)
}
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
the message digest and zeroizing the context.
the message digest and zeroing the context.
*/
void
MD5Final(unsigned char digest[16], MD5_CTX *context)

View File

@ -145,7 +145,7 @@ algorithm (see also Internet RFC 1321). Its use is quite\n\
straightforward: use the new() to create an md5 object. You can now\n\
feed this object with arbitrary strings using the update() method, and\n\
at any point you can ask it for the digest (a strong kind of 128-bit\n\
checksum, a.k.a. ``fingerprint'') of the contatenation of the strings\n\
checksum, a.k.a. ``fingerprint'') of the concatenation of the strings\n\
fed to it so far using the digest() method.\n\
\n\
Functions:\n\

View File

@ -701,7 +701,7 @@ static PyTypeObject mmap_object_type = {
a larger map size, there is no point because all the useful operations
(len(), slicing(), sequence indexing) are limited by a C int.
Returns -1 on error, with an apprpriate Python exception raised. On
Returns -1 on error, with an appropriate Python exception raised. On
success, the map size is returned. */
static int
_GetMapSize(PyObject *o)

View File

@ -1635,8 +1635,8 @@ static const char mp_test_magic[MP_TEST_SIZE] = {'\xAA','\xAA','\xAA','\xAA'};
static mp_test_error( location )
int *location;
{
/* assumptions: *alloc returns address dividable by 4,
mpz_* routines allocate in chunks dividable by four */
/* assumptions: *alloc returns address divisible by 4,
mpz_* routines allocate in chunks divisible by four */
fprintf(stderr, "MP_TEST_ERROR: location holds 0x%08d\n", *location );
Py_FatalError("MP_TEST_ERROR");
} /* static mp_test_error() */

View File

@ -66,7 +66,7 @@ typedef int (*SeqInserter) (PyObject* sequence,
int index,
PyObject* element);
/* The function below is copyrigthed by Stichting Mathematisch Centrum. The
/* The function below is copyrighted by Stichting Mathematisch Centrum. The
* original copyright statement is included below, and continues to apply
* in full to the function immediately following. All other material is
* original, copyrighted by Fred L. Drake, Jr. and Virginia Polytechnic
@ -2403,7 +2403,7 @@ validate_node(node *tree)
res = validate_compound_stmt(tree);
break;
/*
* Fundemental statements.
* Fundamental statements.
*/
case expr_stmt:
res = validate_expr_stmt(tree);
@ -2552,7 +2552,7 @@ validate_file_input(node *tree)
else
res = validate_newline(CHILD(tree, j));
}
/* This stays in to prevent any internal failues from getting to the
/* This stays in to prevent any internal failures from getting to the
* user. Hopefully, this won't be needed. If a user reports getting
* this, we have some debugging to do.
*/

View File

@ -1360,7 +1360,7 @@ Execute a path with arguments and environment, replacing current process.\n\
\n\
path: path of executable file\n\
args: tuple or list of arguments\n\
env: dictonary of strings mapping to strings";
env: dictionary of strings mapping to strings";
static PyObject *
posix_execve(PyObject *self, PyObject *args)
@ -1558,7 +1558,7 @@ Execute a path with arguments and environment, replacing current process.\n\
mode: mode of process creation\n\
path: path of executable file\n\
args: tuple or list of arguments\n\
env: dictonary of strings mapping to strings";
env: dictionary of strings mapping to strings";
static PyObject *
posix_spawnve(PyObject *self, PyObject *args)
@ -1700,7 +1700,7 @@ posix_fork(PyObject *self, PyObject *args)
#include <libutil.h>
#else
/* BSDI does not supply a prototype for the 'openpty' and 'forkpty'
functions, eventhough they are included in libutil. */
functions, even though they are included in libutil. */
#include <termios.h>
extern int openpty(int *, int *, char *, struct termios *, struct winsize *);
extern int forkpty(int *, char *, struct termios *, struct winsize *);
@ -3897,7 +3897,7 @@ posix_tmpnam(PyObject *self, PyObject *args)
/* This is used for fpathconf(), pathconf(), confstr() and sysconf().
* It maps strings representing configuration variable names to
* integer values, allowing those functions to be called with the
* magic names instead of poluting the module's namespace with tons of
* magic names instead of polluting the module's namespace with tons of
* rarely-used constants. There are three separate tables that use
* these definitions.
*

View File

@ -493,7 +493,7 @@ if ((options & ~PUBLIC_STUDY_OPTIONS) != 0)
caseless = ((re->options | options) & PCRE_CASELESS) != 0;
/* For an anchored pattern, or an unchored pattern that has a first char, or a
/* For an anchored pattern, or an unanchored pattern that has a first char, or a
multiline pattern that matches only at "line starts", no further processing at
present. */
@ -1636,8 +1636,8 @@ for (;; ptr++)
*code++ = (repeat_min & 255);
}
/* If the mininum is 1 and the previous item was a character string,
we either have to put back the item that got cancelled if the string
/* If the minimum is 1 and the previous item was a character string,
we either have to put back the item that got canceled if the string
length was 1, or add the character back onto the end of a longer
string. For a character type nothing need be done; it will just get
put back naturally. Note that the final character is always going to
@ -1649,7 +1649,7 @@ for (;; ptr++)
}
/* For a single negated character we also have to put back the
item that got cancelled. */
item that got canceled. */
else if (*previous == OP_NOT) code++;

View File

@ -124,7 +124,7 @@ typedef struct match_state
/* Structure to encapsulate the stack. */
struct
{
/* index into the curent page. If index == 0 and you need
/* index into the current page. If index == 0 and you need
* to pop an item, move to the previous page and set index
* = STACK_PAGE_SIZE - 1. Otherwise decrement index to
* push a page. If index == STACK_PAGE_SIZE and you need

View File

@ -119,7 +119,7 @@ int re_match(regexp_t compiled, unsigned char *string, int size, int pos,
int re_search(regexp_t compiled, unsigned char *string, int size, int startpos,
int range, regexp_registers_t regs);
/* This rearches for a substring matching the regexp. This returns the
/* This searches for a substring matching the regexp. This returns the
* first index at which a match is found. range specifies at how many
* positions to try matching; positive values indicate searching
* forwards, and negative values indicate searching backwards. mstop

View File

@ -70,8 +70,8 @@ resource_getrusage(PyObject *self, PyObject *args)
ru.ru_msgsnd, /* messages sent */
ru.ru_msgrcv, /* messages received */
ru.ru_nsignals, /* signals received */
ru.ru_nvcsw, /* voluntary context switchs */
ru.ru_nivcsw /* involuntary context switchs */
ru.ru_nvcsw, /* voluntary context switches */
ru.ru_nivcsw /* involuntary context switches */
);
}

View File

@ -553,7 +553,7 @@ expandrow(unsigned char *optr, unsigned char *iptr, int z)
* represents one pixel. xsize and ysize specify the dimensions of
* the pixel array. zsize specifies what kind of image file to
* write out. if zsize is 1, the luminance of the pixels are
* calculated, and a sinlge channel black and white image is saved.
* calculated, and a single channel black and white image is saved.
* If zsize is 3, an RGB image file is saved. If zsize is 4, an
* RGBA image file is saved.
*

View File

@ -23,7 +23,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
/* This creates an encryption and decryption engine I am calling
a rotor due to the original design was a harware rotor with
a rotor due to the original design was a hardware rotor with
contacts used in Germany during WWII.
Rotor Module:
@ -43,7 +43,7 @@ Rotor Objects:
NOTE: the {en,de}cryptmore() methods use the setup that was
established via the {en,de}crypt calls. They will NOT
re-initalize the rotors unless: 1) They have not been
initalized with {en,de}crypt since the last setkey() call;
initialized with {en,de}crypt since the last setkey() call;
2) {en,de}crypt has not been called for this rotor yet.
NOTE: you MUST use the SAME key in rotor.newrotor()
@ -209,7 +209,7 @@ rotorobj_new(int num_rotors, char *key)
}
/* These routines impliment the rotor itself */
/* These routines implement the rotor itself */
/* Here is a fairly sophisticated {en,de}cryption system. It is based on
the idea of a "rotor" machine. A bunch of rotors, each with a
@ -217,7 +217,7 @@ rotorobj_new(int num_rotors, char *key)
after encrypting one character. The current state of the rotors is
used to encrypt one character.
The code is smart enought to tell if your alphabet has a number of
The code is smart enough to tell if your alphabet has a number of
characters equal to a power of two. If it does, it uses logical
operations, if not it uses div and mod (both require a division).

View File

@ -167,7 +167,7 @@ static char joinfields__doc__[] =
joinfields(list [,sep]) -> string\n\
\n\
Return a string composed of the words in list, with\n\
intervening occurences of sep. Sep defaults to a single\n\
intervening occurrences of sep. Sep defaults to a single\n\
space.\n\
\n\
(join and joinfields are synonymous)";
@ -1040,10 +1040,10 @@ static int mymemcnt(char *mem, int len, char *pat, int pat_len)
/*
mymemreplace
Return a string in which all occurences of PAT in memory STR are
Return a string in which all occurrences of PAT in memory STR are
replaced with SUB.
If length of PAT is less than length of STR or there are no occurences
If length of PAT is less than length of STR or there are no occurrences
of PAT in STR, then the original string is returned. Otherwise, a new
string is allocated here and returned.

View File

@ -258,7 +258,7 @@ sad_obufcount(sadobject *self, PyObject *args)
PyErr_SetFromErrno(SunAudioError);
return NULL;
}
/* x_ocount is in bytes, wheras play.samples is in frames */
/* x_ocount is in bytes, whereas play.samples is in frames */
/* we want frames */
return PyInt_FromLong(self->x_ocount / (ai.play.channels *
ai.play.precision / 8) -

View File

@ -36,7 +36,7 @@ Revision history:
- Changed arg parsing to use PyArg_ParseTuple.
- Added PyErr_Clear() call(s) where needed.
- Fix core dumps if user message contains format specifiers.
- Change openlog arg defaults to match normal syslog behaviour.
- Change openlog arg defaults to match normal syslog behavior.
- Plug memory leak in openlog().
- Fix setlogmask() to return previous mask value.

View File

@ -119,7 +119,7 @@ InitNotifier()
* None.
*
* Side effects:
* Clears the notifier intialization flag.
* Clears the notifier initialization flag.
*
*----------------------------------------------------------------------
*/
@ -202,7 +202,7 @@ Tcl_CreateEventSource(setupProc, checkProc, clientData)
* None.
*
* Side effects:
* The given event source is cancelled, so its procedure will
* The given event source is canceled, so its procedure will
* never again be called. If no such source exists, nothing
* happens.
*

View File

@ -1077,7 +1077,7 @@ static int instance_contains(PyInstanceObject *inst, PyObject *member)
}
func = instance_getattr(inst, __contains__);
if(func == NULL) {
/* fall back to previous behaviour */
/* fall back to previous behavior */
int i, cmp_res;
if(!PyErr_ExceptionMatches(PyExc_AttributeError))
@ -1160,7 +1160,7 @@ PyInstance_DoBinOp(PyObject *v, PyObject *w, char *opname, char *ropname,
return result;
if (halfbinop(w, v, ropname, &result, thisfunc, 1) <= 0)
return result;
/* Sigh -- special case for comnparisons */
/* Sigh -- special case for comparisons */
if (strcmp(opname, "__cmp__") == 0) {
long c = (v < w) ? -1 : (v > w) ? 1 : 0;
return PyInt_FromLong(c);

View File

@ -185,7 +185,7 @@ lookdict(dictobject *mp, PyObject *key, register long hash)
/* Cycle through GF(2^n)-{0} */
incr = incr << 1;
if (incr > mask)
incr ^= mp->ma_poly; /* This will implicitely clear
incr ^= mp->ma_poly; /* This will implicitly clear
the highest bit */
}
}

View File

@ -311,7 +311,7 @@ int_sub(PyIntObject *v, PyIntObject *w)
/*
Integer overflow checking used to be done using a double, but on 64
bit machines (where both long and double are 64 bit) this fails
because the double doesn't have enouvg precision. John Tromp suggests
because the double doesn't have enough precision. John Tromp suggests
the following algorithm:
Suppose again we normalize a and b to be nonnegative.

View File

@ -337,7 +337,7 @@ do_cmp(PyObject *v, PyObject *w)
PyObject *_PyCompareState_Key;
/* _PyCompareState_nesting is incremented beforing call compare (for
/* _PyCompareState_nesting is incremented before calling compare (for
some types) and decremented on exit. If the count exceeds the
nesting limit, enable code to detect circular data structures.
*/

View File

@ -283,7 +283,7 @@ string_print(PyStringObject *op, FILE *fp, int flags)
return 0;
}
/* figure out which quote to use; single is prefered */
/* figure out which quote to use; single is preferred */
quote = '\'';
if (strchr(op->ob_sval, '\'') && !strchr(op->ob_sval, '"'))
quote = '"';
@ -321,7 +321,7 @@ string_repr(register PyStringObject *op)
register char *p;
int quote;
/* figure out which quote to use; single is prefered */
/* figure out which quote to use; single is preferred */
quote = '\'';
if (strchr(op->ob_sval, '\'') && !strchr(op->ob_sval, '"'))
quote = '"';
@ -1416,10 +1416,10 @@ mymemcnt(const char *mem, int len, const char *pat, int pat_len)
/*
mymemreplace
Return a string in which all occurences of PAT in memory STR are
Return a string in which all occurrences of PAT in memory STR are
replaced with SUB.
If length of PAT is less than length of STR or there are no occurences
If length of PAT is less than length of STR or there are no occurrences
of PAT in STR, then the original string is returned. Otherwise, a new
string is allocated here and returned.
@ -1689,7 +1689,7 @@ string_expandtabs(PyStringObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "|i:expandtabs", &tabsize))
return NULL;
/* First pass: determine size of ouput string */
/* First pass: determine size of output string */
i = j = 0;
e = PyString_AS_STRING(self) + PyString_GET_SIZE(self);
for (p = PyString_AS_STRING(self); p < e; p++)

View File

@ -3198,7 +3198,7 @@ int PyUnicode_Compare(PyObject *left,
if (v == NULL)
goto onError;
/* Shortcut for emtpy or interned objects */
/* Shortcut for empty or interned objects */
if (v == u) {
Py_DECREF(u);
Py_DECREF(v);
@ -3385,7 +3385,7 @@ unicode_expandtabs(PyUnicodeObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "|i:expandtabs", &tabsize))
return NULL;
/* First pass: determine size of ouput string */
/* First pass: determine size of output string */
i = j = 0;
e = self->str + self->length;
for (p = self->str; p < e; p++)

View File

@ -658,7 +658,7 @@ PyWinObject_CloseHKEY(PyObject *obHandle)
** Note that fixupMultiSZ and countString have both had changes
** made to support "incorrect strings". The registry specification
** calls for strings to be terminated with 2 null bytes. It seems
** some commercial packages install strings whcich dont conform,
** some commercial packages install strings which dont conform,
** causing this code to fail - however, "regedit" etc still work
** with these strings (ie only we dont!).
*/

View File

@ -575,7 +575,7 @@ printssdfa(xx_nstates, xx_state, nbits, ll, msg)
equivalent to another oner. This is NOT Algorithm 3.3 from
[Aho&Ullman 77]. It does not always finds the minimal DFA,
but it does usually make a much smaller one... (For an example
of sub-optimal behaviour, try S: x a b+ | y a b+.)
of sub-optimal behavior, try S: x a b+ | y a b+.)
*/
static int

View File

@ -2769,7 +2769,7 @@ build_class(methods, bases, name)
/* Call the base's *type*, if it is callable.
This code is a hook for Donald Beaudry's
and Jim Fulton's type extensions. In
unexended Python it will never be triggered
unextended Python it will never be triggered
since its types are not callable.
Ditto: call the bases's *class*, if it has
one. This makes the same thing possible

View File

@ -146,7 +146,7 @@ PyObject *_PyCodec_Lookup(const char *encoding)
}
/* Convert the encoding to a normalized Python string: all
characters are converted to lower case, spaces and hypens are
characters are converted to lower case, spaces and hyphens are
replaced with underscores. */
v = normalizestring(encoding);
if (v == NULL)
@ -427,7 +427,7 @@ void _PyCodecRegistry_Init()
_PyCodec_SearchCache = PyDict_New();
if (_PyCodec_SearchPath == NULL ||
_PyCodec_SearchCache == NULL)
Py_FatalError("can't intialize codec registry");
Py_FatalError("can't initialize codec registry");
}
void _PyCodecRegistry_Fini()

View File

@ -189,7 +189,7 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
/*
-- Invoke load() with L_NOAUTODEFER leaving the imported symbols
-- of the shared module unresolved. Thus we have to resolve them
-- explicitely with loadbind. The new module is loaded, then we
-- explicitly with loadbind. The new module is loaded, then we
-- resolve its symbols using the list of already loaded modules
-- (only those that belong to the python executable). Get these
-- with loadquery(L_GETINFO).

View File

@ -162,7 +162,7 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
return NULL;
}
if (!NSIsSymbolNameDefined(funcname)) {
/* UnlinkModule() isn't implimented in current versions, but calling it does no harm */
/* UnlinkModule() isn't implemented in current versions, but calling it does no harm */
NSUnLinkModule(newModule, FALSE);
PyErr_Format(PyExc_ImportError,
"Loaded module does not contain symbol %.200s",

View File

@ -183,7 +183,7 @@ static PyObject* get_self(PyObject* args)
{
PyObject* self = PyTuple_GetItem(args, 0);
if (!self) {
/* Watch out for being called to early in the bootstapping process */
/* Watch out for being called to early in the bootstrapping process */
if (PyExc_TypeError) {
PyErr_SetString(PyExc_TypeError,
"unbound method must be called with class instance 1st argument");

View File

@ -13,7 +13,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
/* XXX There are several unchecked sprintf or strcat calls in this file.
XXX The only way these can become a danger is if some C code in the
XXX Python source (or in an extension) uses ridiculously long names
XXX or riduculously deep nesting in format strings. */
XXX or ridiculously deep nesting in format strings. */
#include "Python.h"

View File

@ -75,7 +75,7 @@ int Py_UnicodeFlag = 0; /* Needed by compile.c */
static int initialized = 0;
/* API to access the initialized flag -- useful for eroteric use */
/* API to access the initialized flag -- useful for esoteric use */
int
Py_IsInitialized()

View File

@ -69,7 +69,7 @@ double strtod(str, ptr)
register char *sp, *dp;
register int c;
char *buforg, *buflim;
char buffer[64]; /* 45-digit significand + */
char buffer[64]; /* 45-digit significant + */
/* 13-digit exponent */
sp = str;
while (*sp == ' ') sp++;

View File

@ -13,7 +13,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#include <lwp/stackdep.h>
#define STACKSIZE 1000 /* stacksize for a thread */
#define NSTACKS 2 /* # stacks to be put in cache initialy */
#define NSTACKS 2 /* # stacks to be put in cache initially */
struct lock {
int lock_locked;

View File

@ -122,7 +122,7 @@ PyThread_type_lock PyThread_allocate_lock(void)
PyThread_init_thread();
DosCreateMutexSem(NULL, /* Sem name */
&aLock, /* the semaphone */
&aLock, /* the semaphore */
0, /* shared ? */
0); /* initial state */

View File

@ -1,7 +1,7 @@
"""Extension management for Windows.
Under Windows it is unlikely the .obj files are of use, as special compiler options
are needed (primarily to toggle the behaviour of "public" symbols.
are needed (primarily to toggle the behavior of "public" symbols.
I dont consider it worth parsing the MSVC makefiles for compiler options. Even if
we get it just right, a specific freeze application may have specific compiler

Some files were not shown because too many files have changed in this diff Show More