mirror of
https://github.com/python/cpython.git
synced 2024-11-23 09:54:58 +08:00
typos fixed by Rob Hooft
This commit is contained in:
parent
7c014684c2
commit
a05e293a21
@ -296,7 +296,7 @@ class RCS:
|
||||
def _system(self, cmd):
|
||||
"""INTERNAL: run COMMAND in a subshell.
|
||||
|
||||
Standard input for the command is taken fron /dev/null.
|
||||
Standard input for the command is taken from /dev/null.
|
||||
|
||||
Raise IOError when the exit status is not zero.
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
# - Manipulate the time base:
|
||||
# = resample at a fixed rate
|
||||
# = divide the time codes by a speed factor (to make it go faster/slower)
|
||||
# = drop frames that are less than n msec apart (to accomodate slow players)
|
||||
# = drop frames that are less than n msec apart (to accommodate slow players)
|
||||
# - Convert to a different format
|
||||
# - Magnify (scale) the image
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
# - resample at a fixed rate
|
||||
# - divide the time codes by a speed factor (to make it go faster/slower)
|
||||
# - drop frames that are less than n msec apart (to accomodate slow players)
|
||||
# - drop frames that are less than n msec apart (to accommodate slow players)
|
||||
|
||||
|
||||
# Usage:
|
||||
|
@ -119,7 +119,7 @@ class Queue:
|
||||
def _qsize(self):
|
||||
return len(self.queue)
|
||||
|
||||
# Check wheter the queue is empty
|
||||
# Check whether the queue is empty
|
||||
def _empty(self):
|
||||
return not self.queue
|
||||
|
||||
|
@ -13,7 +13,7 @@ hexbin(inputfilename, outputfilename)
|
||||
# XXXX Note: currently, textfiles appear in mac-form on all platforms.
|
||||
# We seem to lack a simple character-translate in python.
|
||||
# (we should probably use ISO-Latin-1 on all but the mac platform).
|
||||
# XXXX The simeple routines are too simple: they expect to hold the complete
|
||||
# XXXX The simple routines are too simple: they expect to hold the complete
|
||||
# files in-core. Should be fixed.
|
||||
# XXXX It would be nice to handle AppleDouble format on unix
|
||||
# (for servers serving macs).
|
||||
@ -48,7 +48,7 @@ if os.name == 'mac':
|
||||
try:
|
||||
openrf = MacOS.openrf
|
||||
except AttributeError:
|
||||
# Backward compatability
|
||||
# Backward compatibility
|
||||
openrf = open
|
||||
|
||||
def FInfo():
|
||||
|
@ -1,6 +1,6 @@
|
||||
"""Calendar printing functions"""
|
||||
|
||||
# Revision 2: uses funtions from built-in time module
|
||||
# Revision 2: uses functions from built-in time module
|
||||
|
||||
# Import functions and variables from time module
|
||||
from time import localtime, mktime
|
||||
|
@ -323,7 +323,7 @@ class Command:
|
||||
should be disabled by the "dry run" flag, and should announce
|
||||
themselves if the current verbosity level is high enough. This
|
||||
method takes care of all that bureaucracy for you; all you have to
|
||||
do is supply the funtion to call and an argument tuple for it (to
|
||||
do is supply the function to call and an argument tuple for it (to
|
||||
embody the "external action" being performed), a message to print
|
||||
if the verbosity level is high enough, and an optional verbosity
|
||||
threshold.
|
||||
|
@ -1,7 +1,7 @@
|
||||
"""distutils.command.build_ext
|
||||
|
||||
Implements the Distutils 'build_ext' command, for building extension
|
||||
modules (currently limited to C extensions, should accomodate C++
|
||||
modules (currently limited to C extensions, should accommodate C++
|
||||
extensions ASAP)."""
|
||||
|
||||
# created 1999/08/09, Greg Ward
|
||||
@ -385,7 +385,7 @@ class build_ext (Command):
|
||||
# Next, compile the source code to object files.
|
||||
|
||||
# XXX not honouring 'define_macros' or 'undef_macros' -- the
|
||||
# CCompiler API needs to change to accomodate this, and I
|
||||
# CCompiler API needs to change to accommodate this, and I
|
||||
# want to do one thing at a time!
|
||||
|
||||
# Two possible sources for extra compiler arguments:
|
||||
|
@ -28,7 +28,7 @@ else:
|
||||
return os.path.normpath(path)
|
||||
|
||||
|
||||
# More backwards compatability hacks
|
||||
# More backwards compatibility hacks
|
||||
def extend (list, new_list):
|
||||
"""Appends the list 'new_list' to 'list', just like the 'extend()'
|
||||
list method does in Python 1.5.2 -- but this works on earlier
|
||||
|
@ -207,7 +207,7 @@ class StrictVersion (Version):
|
||||
# provides enough benefit to be worth using, and will submit their
|
||||
# version numbering scheme to its domination. The free-thinking
|
||||
# anarchists in the lot will never give in, though, and something needs
|
||||
# to be done to accomodate them.
|
||||
# to be done to accommodate them.
|
||||
#
|
||||
# Perhaps a "moderately strict" version class could be implemented that
|
||||
# lets almost anything slide (syntactically), and makes some heuristic
|
||||
|
@ -24,7 +24,7 @@ def normcase(s):
|
||||
return s
|
||||
|
||||
|
||||
# Return wheter a path is absolute.
|
||||
# Return whether a path is absolute.
|
||||
# Trivial in Posix, harder on the Mac or MS-DOS.
|
||||
|
||||
def isabs(s):
|
||||
@ -304,7 +304,7 @@ do nothing"""
|
||||
|
||||
# Expand paths containing shell variable substitutions.
|
||||
# This expands the forms $variable and ${variable} only.
|
||||
# Non-existant variables are left unchanged.
|
||||
# Non-existent variables are left unchanged.
|
||||
|
||||
_varprog = None
|
||||
|
||||
|
@ -119,7 +119,7 @@ class Queue:
|
||||
def _qsize(self):
|
||||
return len(self.queue)
|
||||
|
||||
# Check wheter the queue is empty
|
||||
# Check whether the queue is empty
|
||||
def _empty(self):
|
||||
return not self.queue
|
||||
|
||||
|
@ -115,7 +115,7 @@ def DeleteTestData(root_key):
|
||||
# Opening should now fail!
|
||||
try:
|
||||
key = OpenKey(root_key, test_key_name)
|
||||
assert 0, "Could open the non-existant key"
|
||||
assert 0, "Could open the non-existent key"
|
||||
except WindowsError: # Use this error name this time
|
||||
pass
|
||||
|
||||
|
@ -36,7 +36,7 @@ def fnmatch(name, pat):
|
||||
return fnmatchcase(name, pat)
|
||||
|
||||
def fnmatchcase(name, pat):
|
||||
"""Test wheter FILENAME matches PATTERN, including case.
|
||||
"""Test whether FILENAME matches PATTERN, including case.
|
||||
|
||||
This is a version of fnmatch() which doesn't case-normalize
|
||||
its arguments.
|
||||
|
@ -220,7 +220,7 @@ def _parse_localename(localename):
|
||||
|
||||
The language code corresponds to RFC 1766. code and encoding
|
||||
can be None in case the values cannot be determined or are
|
||||
unkown to this implementation.
|
||||
unknown to this implementation.
|
||||
|
||||
"""
|
||||
code = normalize(localename)
|
||||
@ -229,7 +229,7 @@ def _parse_localename(localename):
|
||||
elif code == 'C':
|
||||
return None, None
|
||||
else:
|
||||
raise ValueError,'unkown locale: %s' % localename
|
||||
raise ValueError,'unknown locale: %s' % localename
|
||||
return l
|
||||
|
||||
def _build_localename(localetuple):
|
||||
|
@ -200,7 +200,7 @@ TOP_DOWN = 0
|
||||
BOTTOM_UP = 1
|
||||
|
||||
#
|
||||
# SGI Proprietaty Algorithm Header Start Code
|
||||
# SGI Proprietary Algorithm Header Start Code
|
||||
#
|
||||
HEADER_START_CODE = 0xc1C0DEC
|
||||
|
||||
|
@ -203,7 +203,7 @@ def _parse_fd_header(file):
|
||||
return datum[1]
|
||||
#
|
||||
# Internal: parse fd form, or skip if name doesn't match.
|
||||
# the special value None means 'allways parse it'.
|
||||
# the special value None means 'always parse it'.
|
||||
#
|
||||
def _parse_fd_form(file, name):
|
||||
datum = _parse_1_line(file)
|
||||
@ -222,7 +222,7 @@ def _parse_fd_form(file, name):
|
||||
return None
|
||||
|
||||
#
|
||||
# Internal class: a convient place to store object info fields
|
||||
# Internal class: a convenient place to store object info fields
|
||||
#
|
||||
class _newobj:
|
||||
def add(self, name, value):
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Support for the Panel library.
|
||||
# Uses built-in module 'pnl'.
|
||||
# Applciations should use 'panel.function' instead of 'pnl.function';
|
||||
# Applications should use 'panel.function' instead of 'pnl.function';
|
||||
# most 'pnl' functions are transparently exported by 'panel',
|
||||
# but dopanel() is overridden and you have to use this version
|
||||
# if you want to use callbacks.
|
||||
@ -137,7 +137,7 @@ def assign_members(target, attrlist, exclist, prefix):
|
||||
print 'assign failed:', stmt
|
||||
|
||||
|
||||
# Build a real actuator from an actuator descriptior.
|
||||
# Build a real actuator from an actuator description.
|
||||
# Return a pair (actuator, name).
|
||||
#
|
||||
def build_actuator(descr):
|
||||
|
@ -203,7 +203,7 @@ def _parse_fd_header(file):
|
||||
return datum[1]
|
||||
#
|
||||
# Internal: parse fd form, or skip if name doesn't match.
|
||||
# the special value None means 'allways parse it'.
|
||||
# the special value None means 'always parse it'.
|
||||
#
|
||||
def _parse_fd_form(file, name):
|
||||
datum = _parse_1_line(file)
|
||||
@ -222,7 +222,7 @@ def _parse_fd_form(file, name):
|
||||
return None
|
||||
|
||||
#
|
||||
# Internal class: a convient place to store object info fields
|
||||
# Internal class: a convenient place to store object info fields
|
||||
#
|
||||
class _newobj:
|
||||
def add(self, name, value):
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Support for the Panel library.
|
||||
# Uses built-in module 'pnl'.
|
||||
# Applciations should use 'panel.function' instead of 'pnl.function';
|
||||
# Applications should use 'panel.function' instead of 'pnl.function';
|
||||
# most 'pnl' functions are transparently exported by 'panel',
|
||||
# but dopanel() is overridden and you have to use this version
|
||||
# if you want to use callbacks.
|
||||
@ -137,7 +137,7 @@ def assign_members(target, attrlist, exclist, prefix):
|
||||
print 'assign failed:', stmt
|
||||
|
||||
|
||||
# Build a real actuator from an actuator descriptior.
|
||||
# Build a real actuator from an actuator description.
|
||||
# Return a pair (actuator, name).
|
||||
#
|
||||
def build_actuator(descr):
|
||||
|
@ -24,7 +24,7 @@ def normcase(s):
|
||||
return s
|
||||
|
||||
|
||||
# Return wheter a path is absolute.
|
||||
# Return whether a path is absolute.
|
||||
# Trivial in Posix, harder on the Mac or MS-DOS.
|
||||
|
||||
def isabs(s):
|
||||
@ -304,7 +304,7 @@ do nothing"""
|
||||
|
||||
# Expand paths containing shell variable substitutions.
|
||||
# This expands the forms $variable and ${variable} only.
|
||||
# Non-existant variables are left unchanged.
|
||||
# Non-existent variables are left unchanged.
|
||||
|
||||
_varprog = None
|
||||
|
||||
|
@ -47,7 +47,7 @@ attrfind = re.compile(
|
||||
# <foo> and </foo>, respectively, or do_foo to handle <foo> by itself.
|
||||
# (Tags are converted to lower case for this purpose.) The data
|
||||
# between tags is passed to the parser by calling self.handle_data()
|
||||
# with some data as argument (the data may be split up in arbutrary
|
||||
# with some data as argument (the data may be split up in arbitrary
|
||||
# chunks). Entity references are passed by calling
|
||||
# self.handle_entityref() with the entity reference as argument.
|
||||
|
||||
|
@ -122,7 +122,7 @@ del exit
|
||||
#
|
||||
# Set the string encoding used by the Unicode implementation to the
|
||||
# encoding used by the default locale of this system. If the default
|
||||
# encoding cannot be determined or is unkown, it defaults to 'ascii'.
|
||||
# encoding cannot be determined or is unknown, it defaults to 'ascii'.
|
||||
#
|
||||
def locale_aware_defaultencoding():
|
||||
import locale
|
||||
|
@ -8,7 +8,7 @@ from test_support import verbose
|
||||
alattrs = ['__doc__', '__name__', 'getdefault', 'getminmax', 'getname', 'getparams',
|
||||
'newconfig', 'openport', 'queryparams', 'setparams']
|
||||
|
||||
# This is a very inobstrusive test for the existance of the al module and all it's
|
||||
# This is a very unobtrusive test for the existence of the al module and all it's
|
||||
# attributes. More comprehensive examples can be found in Demo/al
|
||||
|
||||
def main():
|
||||
|
@ -270,7 +270,7 @@ if int(-3.5) <> -3: raise TestFailed, 'int(-3.5)'
|
||||
# Different base:
|
||||
if int("10",16) <> 16L: raise TestFailed, 'int("10",16)'
|
||||
if int(u"10",16) <> 16L: raise TestFailed, 'int(u"10",16)'
|
||||
# Test conversion fron strings and various anomalies
|
||||
# Test conversion from strings and various anomalies
|
||||
L = [
|
||||
('0', 0),
|
||||
('1', 1),
|
||||
|
@ -10,7 +10,7 @@ cdattrs = ['BLOCKSIZE', 'CDROM', 'DATASIZE', 'ERROR', 'NODISC', 'PAUSED', 'PLAYI
|
||||
'ident', 'index', 'msftoframe', 'open', 'pnum', 'ptime']
|
||||
|
||||
|
||||
# This is a very inobstrusive test for the existance of the cd module and all it's
|
||||
# This is a very inobtrusive test for the existence of the cd module and all it's
|
||||
# attributes. More comprehensive examples can be found in Demo/cd and
|
||||
# require that you have a CD and a CD ROM drive
|
||||
|
||||
|
@ -63,7 +63,7 @@ clattrs = ['ADDED_ALGORITHM_ERROR', 'ALAW', 'ALGORITHM_ID',
|
||||
'YUV422DC', 'YUV422HC', '__doc__', '__name__', 'cvt_type', 'error']
|
||||
|
||||
|
||||
# This is a very inobstrusive test for the existance of the cl
|
||||
# This is a very inobtrusive test for the existence of the cl
|
||||
# module and all it's attributes.
|
||||
|
||||
def main():
|
||||
|
@ -59,7 +59,7 @@ except KeyError:
|
||||
else:
|
||||
print 'fakename', fakename, 'did not except pwd.getpwnam()'
|
||||
|
||||
# Choose a non-existant uid.
|
||||
# Choose a non-existent uid.
|
||||
fakeuid = 4127
|
||||
while byuids.has_key(fakeuid):
|
||||
fakeuid = (fakeuid * 3) % 0x10000
|
||||
|
@ -115,7 +115,7 @@ def DeleteTestData(root_key):
|
||||
# Opening should now fail!
|
||||
try:
|
||||
key = OpenKey(root_key, test_key_name)
|
||||
assert 0, "Could open the non-existant key"
|
||||
assert 0, "Could open the non-existent key"
|
||||
except WindowsError: # Use this error name this time
|
||||
pass
|
||||
|
||||
|
@ -11,7 +11,7 @@ except ImportError:
|
||||
buf = file.read() * 8
|
||||
file.close()
|
||||
|
||||
# test the chucksums (hex so the test doesn't break on 64-bit machines)
|
||||
# test the checksums (hex so the test doesn't break on 64-bit machines)
|
||||
print hex(zlib.crc32('penguin')), hex(zlib.crc32('penguin', 1))
|
||||
print hex(zlib.adler32('penguin')), hex(zlib.adler32('penguin', 1))
|
||||
|
||||
|
@ -141,7 +141,7 @@ def install_opener(opener):
|
||||
_opener = opener
|
||||
|
||||
# do these error classes make sense?
|
||||
# make sure all of the IOError stuff is overriden. we just want to be
|
||||
# make sure all of the IOError stuff is overridden. we just want to be
|
||||
# subtypes.
|
||||
|
||||
class URLError(IOError):
|
||||
|
@ -79,7 +79,7 @@ xmlns = re.compile('xmlns(?::(?P<ncname>'+_NCName+'))?$')
|
||||
# special names to handle tags: start_foo and end_foo to handle <foo>
|
||||
# and </foo>, respectively. The data between tags is passed to the
|
||||
# parser by calling self.handle_data() with some data as argument (the
|
||||
# data may be split up in arbutrary chunks).
|
||||
# data may be split up in arbitrary chunks).
|
||||
|
||||
class XMLParser:
|
||||
attributes = {} # default, to be overridden
|
||||
|
Loading…
Reference in New Issue
Block a user