mirror of
https://github.com/python/cpython
synced 2024-10-14 12:30:01 +00:00
#18705: fix a number of typos. Patch by Févry Thibault.
This commit is contained in:
parent
67f39777fa
commit
30b9d5d3af
|
@ -53,7 +53,7 @@ def _find_executable(executable, path=None):
|
||||||
|
|
||||||
|
|
||||||
def _read_output(commandstring):
|
def _read_output(commandstring):
|
||||||
"""Output from succesful command execution or None"""
|
"""Output from successful command execution or None"""
|
||||||
# Similar to os.popen(commandstring, "r").read(),
|
# Similar to os.popen(commandstring, "r").read(),
|
||||||
# but without actually using os.popen because that
|
# but without actually using os.popen because that
|
||||||
# function is not usable during python bootstrap.
|
# function is not usable during python bootstrap.
|
||||||
|
@ -152,7 +152,7 @@ def _find_appropriate_compiler(_config_vars):
|
||||||
# are not installed.
|
# are not installed.
|
||||||
#
|
#
|
||||||
# Futhermore, the compiler that can be used varies between
|
# Futhermore, the compiler that can be used varies between
|
||||||
# Xcode releases. Upto Xcode 4 it was possible to use 'gcc-4.2'
|
# Xcode releases. Up to Xcode 4 it was possible to use 'gcc-4.2'
|
||||||
# as the compiler, after that 'clang' should be used because
|
# as the compiler, after that 'clang' should be used because
|
||||||
# gcc-4.2 is either not present, or a copy of 'llvm-gcc' that
|
# gcc-4.2 is either not present, or a copy of 'llvm-gcc' that
|
||||||
# miscompiles Python.
|
# miscompiles Python.
|
||||||
|
@ -192,7 +192,7 @@ def _find_appropriate_compiler(_config_vars):
|
||||||
|
|
||||||
if cc != oldcc:
|
if cc != oldcc:
|
||||||
# Found a replacement compiler.
|
# Found a replacement compiler.
|
||||||
# Modify config vars using new compiler, if not already explictly
|
# Modify config vars using new compiler, if not already explicitly
|
||||||
# overriden by an env variable, preserving additional arguments.
|
# overriden by an env variable, preserving additional arguments.
|
||||||
for cv in _COMPILER_CONFIG_VARS:
|
for cv in _COMPILER_CONFIG_VARS:
|
||||||
if cv in _config_vars and cv not in os.environ:
|
if cv in _config_vars and cv not in os.environ:
|
||||||
|
@ -274,7 +274,7 @@ def _check_for_unavailable_sdk(_config_vars):
|
||||||
# compile an extension using an SDK that is not present
|
# compile an extension using an SDK that is not present
|
||||||
# on the current machine it is better to not use an SDK
|
# on the current machine it is better to not use an SDK
|
||||||
# than to fail. This is particularly important with
|
# than to fail. This is particularly important with
|
||||||
# the standalong Command Line Tools alternative to a
|
# the standalone Command Line Tools alternative to a
|
||||||
# full-blown Xcode install since the CLT packages do not
|
# full-blown Xcode install since the CLT packages do not
|
||||||
# provide SDKs. If the SDK is not present, it is assumed
|
# provide SDKs. If the SDK is not present, it is assumed
|
||||||
# that the header files and dev libs have been installed
|
# that the header files and dev libs have been installed
|
||||||
|
@ -378,7 +378,7 @@ def customize_config_vars(_config_vars):
|
||||||
compilers are present, i.e. when installing pure
|
compilers are present, i.e. when installing pure
|
||||||
Python dists. Customization of compiler paths
|
Python dists. Customization of compiler paths
|
||||||
and detection of unavailable archs is deferred
|
and detection of unavailable archs is deferred
|
||||||
until the first extention module build is
|
until the first extension module build is
|
||||||
requested (in distutils.sysconfig.customize_compiler).
|
requested (in distutils.sysconfig.customize_compiler).
|
||||||
|
|
||||||
Currently called from distutils.sysconfig
|
Currently called from distutils.sysconfig
|
||||||
|
|
|
@ -225,7 +225,7 @@ def __seqToRE(self, to_convert, directive):
|
||||||
"""Convert a list to a regex string for matching a directive.
|
"""Convert a list to a regex string for matching a directive.
|
||||||
|
|
||||||
Want possible matching values to be from longest to shortest. This
|
Want possible matching values to be from longest to shortest. This
|
||||||
prevents the possibility of a match occuring for a value that also
|
prevents the possibility of a match occurring for a value that also
|
||||||
a substring of a larger value that should have matched (e.g., 'abc'
|
a substring of a larger value that should have matched (e.g., 'abc'
|
||||||
matching when 'abcdef' should have been the match).
|
matching when 'abcdef' should have been the match).
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
compression type, and then write audio frames using writeframesraw.
|
compression type, and then write audio frames using writeframesraw.
|
||||||
When all frames have been written, either call writeframes('') or
|
When all frames have been written, either call writeframes('') or
|
||||||
close() to patch up the sizes in the header.
|
close() to patch up the sizes in the header.
|
||||||
Marks can be added anytime. If there are any marks, ypu must call
|
Marks can be added anytime. If there are any marks, you must call
|
||||||
close() after all frames have been written.
|
close() after all frames have been written.
|
||||||
The close() method is called automatically when the class instance
|
The close() method is called automatically when the class instance
|
||||||
is destroyed.
|
is destroyed.
|
||||||
|
|
|
@ -220,7 +220,7 @@ def monthdayscalendar(self, year, month):
|
||||||
def yeardatescalendar(self, year, width=3):
|
def yeardatescalendar(self, year, width=3):
|
||||||
"""
|
"""
|
||||||
Return the data for the specified year ready for formatting. The return
|
Return the data for the specified year ready for formatting. The return
|
||||||
value is a list of month rows. Each month row contains upto width months.
|
value is a list of month rows. Each month row contains up to width months.
|
||||||
Each month contains between 4 and 6 weeks and each week contains 1-7
|
Each month contains between 4 and 6 weeks and each week contains 1-7
|
||||||
days. Days are datetime.date objects.
|
days. Days are datetime.date objects.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -49,7 +49,7 @@ def _days_in_month(year, month):
|
||||||
return _DAYS_IN_MONTH[month]
|
return _DAYS_IN_MONTH[month]
|
||||||
|
|
||||||
def _days_before_month(year, month):
|
def _days_before_month(year, month):
|
||||||
"year, month -> number of days in year preceeding first day of month."
|
"year, month -> number of days in year preceding first day of month."
|
||||||
assert 1 <= month <= 12, 'month must be in 1..12'
|
assert 1 <= month <= 12, 'month must be in 1..12'
|
||||||
return _DAYS_BEFORE_MONTH[month] + (month > 2 and _is_leap(year))
|
return _DAYS_BEFORE_MONTH[month] + (month > 2 and _is_leap(year))
|
||||||
|
|
||||||
|
|
|
@ -589,7 +589,7 @@ def get_opcodes(self):
|
||||||
def get_grouped_opcodes(self, n=3):
|
def get_grouped_opcodes(self, n=3):
|
||||||
""" Isolate change clusters by eliminating ranges with no changes.
|
""" Isolate change clusters by eliminating ranges with no changes.
|
||||||
|
|
||||||
Return a generator of groups with upto n lines of context.
|
Return a generator of groups with up to n lines of context.
|
||||||
Each group is in the same format as returned by get_opcodes().
|
Each group is in the same format as returned by get_opcodes().
|
||||||
|
|
||||||
>>> from pprint import pprint
|
>>> from pprint import pprint
|
||||||
|
@ -1365,7 +1365,7 @@ def _mdiff(fromlines, tolines, context=None, linejunk=None,
|
||||||
linejunk -- passed on to ndiff (see ndiff documentation)
|
linejunk -- passed on to ndiff (see ndiff documentation)
|
||||||
charjunk -- passed on to ndiff (see ndiff documentation)
|
charjunk -- passed on to ndiff (see ndiff documentation)
|
||||||
|
|
||||||
This function returns an interator which returns a tuple:
|
This function returns an iterator which returns a tuple:
|
||||||
(from line tuple, to line tuple, boolean flag)
|
(from line tuple, to line tuple, boolean flag)
|
||||||
|
|
||||||
from/to line tuple -- (line num, line text)
|
from/to line tuple -- (line num, line text)
|
||||||
|
@ -1967,7 +1967,7 @@ def make_table(self,fromlines,tolines,fromdesc='',todesc='',context=False,
|
||||||
self._make_prefix()
|
self._make_prefix()
|
||||||
|
|
||||||
# change tabs to spaces before it gets more difficult after we insert
|
# change tabs to spaces before it gets more difficult after we insert
|
||||||
# markkup
|
# markup
|
||||||
fromlines,tolines = self._tab_newline_replace(fromlines,tolines)
|
fromlines,tolines = self._tab_newline_replace(fromlines,tolines)
|
||||||
|
|
||||||
# create diffs iterator which generates side by side from/to data
|
# create diffs iterator which generates side by side from/to data
|
||||||
|
|
|
@ -413,7 +413,7 @@ class Example:
|
||||||
zero-based, with respect to the beginning of the DocTest.
|
zero-based, with respect to the beginning of the DocTest.
|
||||||
|
|
||||||
- indent: The example's indentation in the DocTest string.
|
- indent: The example's indentation in the DocTest string.
|
||||||
I.e., the number of space characters that preceed the
|
I.e., the number of space characters that precede the
|
||||||
example's first prompt.
|
example's first prompt.
|
||||||
|
|
||||||
- options: A dictionary mapping from option flags to True or
|
- options: A dictionary mapping from option flags to True or
|
||||||
|
@ -893,7 +893,7 @@ def find(self, obj, name=None, module=None, globs=None, extraglobs=None):
|
||||||
if '__name__' not in globs:
|
if '__name__' not in globs:
|
||||||
globs['__name__'] = '__main__' # provide a default module name
|
globs['__name__'] = '__main__' # provide a default module name
|
||||||
|
|
||||||
# Recursively expore `obj`, extracting DocTests.
|
# Recursively explore `obj`, extracting DocTests.
|
||||||
tests = []
|
tests = []
|
||||||
self._find(tests, obj, name, module, source_lines, globs, {})
|
self._find(tests, obj, name, module, source_lines, globs, {})
|
||||||
# Sort the tests by alpha order of names, for consistency in
|
# Sort the tests by alpha order of names, for consistency in
|
||||||
|
|
|
@ -22,7 +22,7 @@ def exists(path):
|
||||||
|
|
||||||
|
|
||||||
# This follows symbolic links, so both islink() and isdir() can be true
|
# This follows symbolic links, so both islink() and isdir() can be true
|
||||||
# for the same path ono systems that support symlinks
|
# for the same path on systems that support symlinks
|
||||||
def isfile(path):
|
def isfile(path):
|
||||||
"""Test whether a path is a regular file"""
|
"""Test whether a path is a regular file"""
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
# Create constants for the compiler flags in Include/code.h
|
# Create constants for the compiler flags in Include/code.h
|
||||||
# We try to get them from dis to avoid duplication, but fall
|
# We try to get them from dis to avoid duplication, but fall
|
||||||
# back to hardcording so the dependency is optional
|
# back to hardcoding so the dependency is optional
|
||||||
try:
|
try:
|
||||||
from dis import COMPILER_FLAG_NAMES as _flag_names
|
from dis import COMPILER_FLAG_NAMES as _flag_names
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -185,7 +185,7 @@ def isgenerator(object):
|
||||||
"""Return true if the object is a generator.
|
"""Return true if the object is a generator.
|
||||||
|
|
||||||
Generator objects provide these attributes:
|
Generator objects provide these attributes:
|
||||||
__iter__ defined to support interation over container
|
__iter__ defined to support iteration over container
|
||||||
close raises a new GeneratorExit exception inside the
|
close raises a new GeneratorExit exception inside the
|
||||||
generator to terminate the iteration
|
generator to terminate the iteration
|
||||||
gi_code code object
|
gi_code code object
|
||||||
|
|
|
@ -727,7 +727,7 @@ def address_exclude(self, other):
|
||||||
minus other.
|
minus other.
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
TypeError: If self and other are of difffering address
|
TypeError: If self and other are of differing address
|
||||||
versions, or if other is not a network object.
|
versions, or if other is not a network object.
|
||||||
ValueError: If other is not completely contained by self.
|
ValueError: If other is not completely contained by self.
|
||||||
|
|
||||||
|
@ -1378,7 +1378,7 @@ def __init__(self, address, strict=True):
|
||||||
'192.0.2.1'
|
'192.0.2.1'
|
||||||
'192.0.2.1/255.255.255.255'
|
'192.0.2.1/255.255.255.255'
|
||||||
'192.0.2.1/32'
|
'192.0.2.1/32'
|
||||||
are also functionaly equivalent. That is to say, failing to
|
are also functionally equivalent. That is to say, failing to
|
||||||
provide a subnetmask will create an object with a mask of /32.
|
provide a subnetmask will create an object with a mask of /32.
|
||||||
|
|
||||||
If the mask (portion after the / in the argument) is given in
|
If the mask (portion after the / in the argument) is given in
|
||||||
|
|
|
@ -509,7 +509,7 @@ def report(self):
|
||||||
# Print modules that may be missing, but then again, maybe not...
|
# Print modules that may be missing, but then again, maybe not...
|
||||||
if maybe:
|
if maybe:
|
||||||
print()
|
print()
|
||||||
print("Submodules thay appear to be missing, but could also be", end=' ')
|
print("Submodules that appear to be missing, but could also be", end=' ')
|
||||||
print("global names in the parent package:")
|
print("global names in the parent package:")
|
||||||
for name in maybe:
|
for name in maybe:
|
||||||
mods = sorted(self.badmodules[name].keys())
|
mods = sorted(self.badmodules[name].keys())
|
||||||
|
|
|
@ -337,7 +337,7 @@ def get_command_line():
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
'''
|
'''
|
||||||
Run code specifed by data received over pipe
|
Run code specified by data received over pipe
|
||||||
'''
|
'''
|
||||||
assert is_forking(sys.argv)
|
assert is_forking(sys.argv)
|
||||||
|
|
||||||
|
|
|
@ -1463,7 +1463,7 @@ def _match_long_opt(self, opt):
|
||||||
"""_match_long_opt(opt : string) -> string
|
"""_match_long_opt(opt : string) -> string
|
||||||
|
|
||||||
Determine which long option string 'opt' matches, ie. which one
|
Determine which long option string 'opt' matches, ie. which one
|
||||||
it is an unambiguous abbrevation for. Raises BadOptionError if
|
it is an unambiguous abbreviation for. Raises BadOptionError if
|
||||||
'opt' doesn't unambiguously match any long option string.
|
'opt' doesn't unambiguously match any long option string.
|
||||||
"""
|
"""
|
||||||
return _match_abbrev(opt, self._long_opt)
|
return _match_abbrev(opt, self._long_opt)
|
||||||
|
|
|
@ -1004,7 +1004,7 @@ def do_next(self, arg):
|
||||||
def do_run(self, arg):
|
def do_run(self, arg):
|
||||||
"""run [args...]
|
"""run [args...]
|
||||||
Restart the debugged python program. If a string is supplied
|
Restart the debugged python program. If a string is supplied
|
||||||
it is splitted with "shlex", and the result is used as the new
|
it is split with "shlex", and the result is used as the new
|
||||||
sys.argv. History, breakpoints, actions and debugger options
|
sys.argv. History, breakpoints, actions and debugger options
|
||||||
are preserved. "restart" is an alias for "run".
|
are preserved. "restart" is an alias for "run".
|
||||||
"""
|
"""
|
||||||
|
@ -1361,7 +1361,7 @@ def complete_undisplay(self, text, line, begidx, endidx):
|
||||||
def do_interact(self, arg):
|
def do_interact(self, arg):
|
||||||
"""interact
|
"""interact
|
||||||
|
|
||||||
Start an interative interpreter whose global namespace
|
Start an interactive interpreter whose global namespace
|
||||||
contains all the (global and local) names found in the current scope.
|
contains all the (global and local) names found in the current scope.
|
||||||
"""
|
"""
|
||||||
ns = self.curframe.f_globals.copy()
|
ns = self.curframe.f_globals.copy()
|
||||||
|
|
|
@ -888,7 +888,7 @@ def __repr__(self):
|
||||||
obtype=StackObject,
|
obtype=StackObject,
|
||||||
doc="""An object representing a contiguous slice of the stack.
|
doc="""An object representing a contiguous slice of the stack.
|
||||||
|
|
||||||
This is used in conjuction with markobject, to represent all
|
This is used in conjunction with markobject, to represent all
|
||||||
of the stack following the topmost markobject. For example,
|
of the stack following the topmost markobject. For example,
|
||||||
the POP_MARK opcode changes the stack from
|
the POP_MARK opcode changes the stack from
|
||||||
|
|
||||||
|
@ -2038,12 +2038,12 @@ def dis(pickle, out=None, memo=None, indentlevel=4, annotate=0):
|
||||||
|
|
||||||
stack = [] # crude emulation of unpickler stack
|
stack = [] # crude emulation of unpickler stack
|
||||||
if memo is None:
|
if memo is None:
|
||||||
memo = {} # crude emulation of unpicker memo
|
memo = {} # crude emulation of unpickler memo
|
||||||
maxproto = -1 # max protocol number seen
|
maxproto = -1 # max protocol number seen
|
||||||
markstack = [] # bytecode positions of MARK opcodes
|
markstack = [] # bytecode positions of MARK opcodes
|
||||||
indentchunk = ' ' * indentlevel
|
indentchunk = ' ' * indentlevel
|
||||||
errormsg = None
|
errormsg = None
|
||||||
annocol = annotate # columnt hint for annotations
|
annocol = annotate # column hint for annotations
|
||||||
for opcode, arg, pos in genops(pickle):
|
for opcode, arg, pos in genops(pickle):
|
||||||
if pos is not None:
|
if pos is not None:
|
||||||
print("%5d:" % pos, end=' ', file=out)
|
print("%5d:" % pos, end=' ', file=out)
|
||||||
|
|
|
@ -230,7 +230,7 @@ def _dist_try_harder(distname,version,id):
|
||||||
return 'OpenLinux',pkg[1],id
|
return 'OpenLinux',pkg[1],id
|
||||||
|
|
||||||
if os.path.isdir('/usr/lib/setup'):
|
if os.path.isdir('/usr/lib/setup'):
|
||||||
# Check for slackware verson tag file (thanks to Greg Andruk)
|
# Check for slackware version tag file (thanks to Greg Andruk)
|
||||||
verfiles = os.listdir('/usr/lib/setup')
|
verfiles = os.listdir('/usr/lib/setup')
|
||||||
for n in range(len(verfiles)-1, -1, -1):
|
for n in range(len(verfiles)-1, -1, -1):
|
||||||
if verfiles[n][:14] != 'slack-version-':
|
if verfiles[n][:14] != 'slack-version-':
|
||||||
|
@ -282,7 +282,7 @@ def _parse_release_file(firstline):
|
||||||
if m is not None:
|
if m is not None:
|
||||||
return tuple(m.groups())
|
return tuple(m.groups())
|
||||||
|
|
||||||
# Unkown format... take the first two words
|
# Unknown format... take the first two words
|
||||||
l = firstline.strip().split()
|
l = firstline.strip().split()
|
||||||
if l:
|
if l:
|
||||||
version = l[0]
|
version = l[0]
|
||||||
|
@ -720,7 +720,7 @@ def mac_ver(release='',versioninfo=('','',''),machine=''):
|
||||||
versioninfo, machine) with versioninfo being a tuple (version,
|
versioninfo, machine) with versioninfo being a tuple (version,
|
||||||
dev_stage, non_release_version).
|
dev_stage, non_release_version).
|
||||||
|
|
||||||
Entries which cannot be determined are set to the paramter values
|
Entries which cannot be determined are set to the parameter values
|
||||||
which default to ''. All tuple entries are strings.
|
which default to ''. All tuple entries are strings.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
@ -328,7 +328,7 @@ class POP3_SSL(POP3):
|
||||||
|
|
||||||
hostname - the hostname of the pop3 over ssl server
|
hostname - the hostname of the pop3 over ssl server
|
||||||
port - port number
|
port - port number
|
||||||
keyfile - PEM formatted file that countains your private key
|
keyfile - PEM formatted file that contains your private key
|
||||||
certfile - PEM formatted certificate chain file
|
certfile - PEM formatted certificate chain file
|
||||||
|
|
||||||
See the methods of the parent class POP3 for more documentation.
|
See the methods of the parent class POP3 for more documentation.
|
||||||
|
|
|
@ -110,7 +110,7 @@ def attr_matches(self, text):
|
||||||
"""Compute matches when text contains a dot.
|
"""Compute matches when text contains a dot.
|
||||||
|
|
||||||
Assuming the text is of the form NAME.NAME....[NAME], and is
|
Assuming the text is of the form NAME.NAME....[NAME], and is
|
||||||
evaluatable in self.namespace, it will be evaluated and its attributes
|
evaluable in self.namespace, it will be evaluated and its attributes
|
||||||
(as revealed by dir()) are used as possible completions. (For class
|
(as revealed by dir()) are used as possible completions. (For class
|
||||||
instances, class members are also considered.)
|
instances, class members are also considered.)
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ class ReadError(EnvironmentError):
|
||||||
"""Raised when an archive cannot be read"""
|
"""Raised when an archive cannot be read"""
|
||||||
|
|
||||||
class RegistryError(Exception):
|
class RegistryError(Exception):
|
||||||
"""Raised when a registery operation with the archiving
|
"""Raised when a registry operation with the archiving
|
||||||
and unpacking registeries fails"""
|
and unpacking registeries fails"""
|
||||||
|
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ def lookup(name):
|
||||||
# * follow_symlinks=False,
|
# * follow_symlinks=False,
|
||||||
# * lchown() is unavailable, and
|
# * lchown() is unavailable, and
|
||||||
# * either
|
# * either
|
||||||
# * fchownat() is unvailable or
|
# * fchownat() is unavailable or
|
||||||
# * fchownat() doesn't implement AT_SYMLINK_NOFOLLOW.
|
# * fchownat() doesn't implement AT_SYMLINK_NOFOLLOW.
|
||||||
# (it returned ENOSUP.)
|
# (it returned ENOSUP.)
|
||||||
# therefore we're out of options--we simply cannot chown the
|
# therefore we're out of options--we simply cannot chown the
|
||||||
|
@ -984,7 +984,7 @@ def disk_usage(path):
|
||||||
def disk_usage(path):
|
def disk_usage(path):
|
||||||
"""Return disk usage statistics about the given path.
|
"""Return disk usage statistics about the given path.
|
||||||
|
|
||||||
Returned valus is a named tuple with attributes 'total', 'used' and
|
Returned values is a named tuple with attributes 'total', 'used' and
|
||||||
'free', which are the amount of total, used and free space, in bytes.
|
'free', which are the amount of total, used and free space, in bytes.
|
||||||
"""
|
"""
|
||||||
total, free = nt._getdiskusage(path)
|
total, free = nt._getdiskusage(path)
|
||||||
|
|
|
@ -134,7 +134,7 @@ def _dnsname_to_pat(dn, max_wildcards=1):
|
||||||
for frag in dn.split(r'.'):
|
for frag in dn.split(r'.'):
|
||||||
if frag.count('*') > max_wildcards:
|
if frag.count('*') > max_wildcards:
|
||||||
# Issue #17980: avoid denials of service by refusing more
|
# Issue #17980: avoid denials of service by refusing more
|
||||||
# than one wildcard per fragment. A survery of established
|
# than one wildcard per fragment. A survey of established
|
||||||
# policy among SSL implementations showed it to be a
|
# policy among SSL implementations showed it to be a
|
||||||
# reasonable choice.
|
# reasonable choice.
|
||||||
raise CertificateError(
|
raise CertificateError(
|
||||||
|
|
|
@ -185,7 +185,7 @@ class Popen(args, bufsize=-1, executable=None,
|
||||||
started to execute, will be re-raised in the parent. Additionally,
|
started to execute, will be re-raised in the parent. Additionally,
|
||||||
the exception object will have one extra attribute called
|
the exception object will have one extra attribute called
|
||||||
'child_traceback', which is a string containing traceback information
|
'child_traceback', which is a string containing traceback information
|
||||||
from the childs point of view.
|
from the child's point of view.
|
||||||
|
|
||||||
The most common exception raised is OSError. This occurs, for
|
The most common exception raised is OSError. This occurs, for
|
||||||
example, when trying to execute a non-existent file. Applications
|
example, when trying to execute a non-existent file. Applications
|
||||||
|
|
|
@ -289,7 +289,7 @@ class ExtractError(TarError):
|
||||||
"""General exception for extract errors."""
|
"""General exception for extract errors."""
|
||||||
pass
|
pass
|
||||||
class ReadError(TarError):
|
class ReadError(TarError):
|
||||||
"""Exception for unreadble tar archives."""
|
"""Exception for unreadable tar archives."""
|
||||||
pass
|
pass
|
||||||
class CompressionError(TarError):
|
class CompressionError(TarError):
|
||||||
"""Exception for unavailable compression methods."""
|
"""Exception for unavailable compression methods."""
|
||||||
|
|
|
@ -634,7 +634,7 @@ class TemporaryDirectory(object):
|
||||||
with TemporaryDirectory() as tmpdir:
|
with TemporaryDirectory() as tmpdir:
|
||||||
...
|
...
|
||||||
|
|
||||||
Upon exiting the context, the directory and everthing contained
|
Upon exiting the context, the directory and everything contained
|
||||||
in it are removed.
|
in it are removed.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# Note regarding PEP 8 compliant names
|
# Note regarding PEP 8 compliant names
|
||||||
# This threading model was originally inspired by Java, and inherited
|
# This threading model was originally inspired by Java, and inherited
|
||||||
# the convention of camelCase function and method names from that
|
# the convention of camelCase function and method names from that
|
||||||
# language. Those originaly names are not in any imminent danger of
|
# language. Those original names are not in any imminent danger of
|
||||||
# being deprecated (even for Py3k),so this module provides them as an
|
# being deprecated (even for Py3k),so this module provides them as an
|
||||||
# alias for the PEP 8 compliant names
|
# alias for the PEP 8 compliant names
|
||||||
# Note that using the new PEP 8 compliant names facilitates substitution
|
# Note that using the new PEP 8 compliant names facilitates substitution
|
||||||
|
|
|
@ -1278,7 +1278,7 @@ def delay(self, delay=None):
|
||||||
self._delayvalue = int(delay)
|
self._delayvalue = int(delay)
|
||||||
|
|
||||||
def _incrementudc(self):
|
def _incrementudc(self):
|
||||||
"""Increment upadate counter."""
|
"""Increment update counter."""
|
||||||
if not TurtleScreen._RUNNING:
|
if not TurtleScreen._RUNNING:
|
||||||
TurtleScreen._RUNNNING = True
|
TurtleScreen._RUNNNING = True
|
||||||
raise Terminator
|
raise Terminator
|
||||||
|
@ -2527,7 +2527,7 @@ def __init__(self, canvas=None,
|
||||||
self.screen = TurtleScreen(canvas)
|
self.screen = TurtleScreen(canvas)
|
||||||
RawTurtle.screens.append(self.screen)
|
RawTurtle.screens.append(self.screen)
|
||||||
else:
|
else:
|
||||||
raise TurtleGraphicsError("bad cavas argument %s" % canvas)
|
raise TurtleGraphicsError("bad canvas argument %s" % canvas)
|
||||||
|
|
||||||
screen = self.screen
|
screen = self.screen
|
||||||
TNavigator.__init__(self, screen.mode())
|
TNavigator.__init__(self, screen.mode())
|
||||||
|
@ -2772,7 +2772,7 @@ def shape(self, name=None):
|
||||||
def shapesize(self, stretch_wid=None, stretch_len=None, outline=None):
|
def shapesize(self, stretch_wid=None, stretch_len=None, outline=None):
|
||||||
"""Set/return turtle's stretchfactors/outline. Set resizemode to "user".
|
"""Set/return turtle's stretchfactors/outline. Set resizemode to "user".
|
||||||
|
|
||||||
Optinonal arguments:
|
Optional arguments:
|
||||||
stretch_wid : positive number
|
stretch_wid : positive number
|
||||||
stretch_len : positive number
|
stretch_len : positive number
|
||||||
outline : positive number
|
outline : positive number
|
||||||
|
@ -3135,7 +3135,7 @@ def clearstamps(self, n=None):
|
||||||
|
|
||||||
def _goto(self, end):
|
def _goto(self, end):
|
||||||
"""Move the pen to the point end, thereby drawing a line
|
"""Move the pen to the point end, thereby drawing a line
|
||||||
if pen is down. All other methodes for turtle movement depend
|
if pen is down. All other methods for turtle movement depend
|
||||||
on this one.
|
on this one.
|
||||||
"""
|
"""
|
||||||
## Version with undo-stuff
|
## Version with undo-stuff
|
||||||
|
|
Loading…
Reference in a new issue