[Python-checkins] CVS: python/dist/src/Doc/lib libos.tex,1.58,1.59 libprofile.tex,1.35,1.36 libre.tex,1.61,1.62 librexec.tex,1.15,1.16 librlcompleter.tex,1.5,1.6 libsha.tex,1.6,1.7 libsignal.tex,1.20,1.21 libstdtypes.tex,1.63,1.64 libstringio.tex,1.5,1.6 libstruct.tex,1.29,1.30 libthreading.tex,1.8,1.9 libtime.tex,1.39,1.40 libuser.tex,1.16,1.17 libwinreg.tex,1.6,1.7 libxmllib.tex,1.30,1.31 libzipfile.tex,1.11,1.12 xmlsaxreader.tex,1.1,1.2
Fred L. Drake
fdrake@users.sourceforge.net
Fri, 06 Jul 2001 13:30:13 -0700
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv26370
Modified Files:
libos.tex libprofile.tex libre.tex librexec.tex
librlcompleter.tex libsha.tex libsignal.tex libstdtypes.tex
libstringio.tex libstruct.tex libthreading.tex libtime.tex
libuser.tex libwinreg.tex libxmllib.tex libzipfile.tex
xmlsaxreader.tex
Log Message:
Fix up a few style nits -- avoid "e.g." and "i.e." -- these make
translation more difficult, as well as reading the English more
difficult for non-native speakers.
Index: libos.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -r1.58 -r1.59
*** libos.tex 2001/06/11 18:25:34 1.58
--- libos.tex 2001/07/06 20:30:11 1.59
***************
*** 14,18 ****
as found there. The design of all Python's built-in OS dependent
modules is such that as long as the same functionality is available,
! it uses the same interface; e.g., the function
\code{os.stat(\var{path})} returns stat information about \var{path} in
the same format (which happens to have originated with the
--- 14,18 ----
as found there. The design of all Python's built-in OS dependent
modules is such that as long as the same functionality is available,
! it uses the same interface; for example, the function
\code{os.stat(\var{path})} returns stat information about \var{path} in
the same format (which happens to have originated with the
***************
*** 43,49 ****
\begin{excdesc}{error}
! This exception is raised when a function returns a
! system-related error (e.g., not for illegal argument types). This is
! also known as the built-in exception \exception{OSError}. The
accompanying value is a pair containing the numeric error code from
\cdata{errno} and the corresponding string, as would be printed by the
--- 43,49 ----
\begin{excdesc}{error}
! This exception is raised when a function returns a system-related
! error (not for illegal argument types or other incidental errors).
! This is also known as the built-in exception \exception{OSError}. The
accompanying value is a pair containing the numeric error code from
\cdata{errno} and the corresponding string, as would be printed by the
***************
*** 56,60 ****
the C \cdata{errno} variable, and the latter holds the corresponding
error message from \cfunction{strerror()}. For exceptions that
! involve a file system path (e.g. \function{chdir()} or
\function{unlink()}), the exception instance will contain a third
attribute, \member{filename}, which is the file name passed to the
--- 56,60 ----
the C \cdata{errno} variable, and the latter holds the corresponding
error message from \cfunction{strerror()}. For exceptions that
! involve a file system path (such as \function{chdir()} or
\function{unlink()}), the exception instance will contain a third
attribute, \member{filename}, which is the file name passed to the
***************
*** 73,80 ****
\begin{datadesc}{path}
The corresponding OS dependent standard module for pathname
! operations, e.g., \module{posixpath} or \module{macpath}. Thus, given
! the proper imports, \code{os.path.split(\var{file})} is equivalent to but
! more portable than \code{posixpath.split(\var{file})}. Note that this
! is also a valid module: it may be imported directly as
\refmodule{os.path}.
\end{datadesc}
--- 73,81 ----
\begin{datadesc}{path}
The corresponding OS dependent standard module for pathname
! operations, such as \module{posixpath} or \module{macpath}. Thus,
! given the proper imports, \code{os.path.split(\var{file})} is
! equivalent to but more portable than
! \code{posixpath.split(\var{file})}. Note that this is also an
! importable module: it may be imported directly as
\refmodule{os.path}.
\end{datadesc}
***************
*** 859,863 ****
\begin{funcdesc}{execv}{path, args}
Execute the executable \var{path} with argument list \var{args},
! replacing the current process (i.e., the Python interpreter).
The argument list may be a tuple or list of strings.
Availability: \UNIX{}, Windows.
--- 860,864 ----
\begin{funcdesc}{execv}{path, args}
Execute the executable \var{path} with argument list \var{args},
! replacing the current process (the Python interpreter).
The argument list may be a tuple or list of strings.
Availability: \UNIX{}, Windows.
***************
*** 866,871 ****
\begin{funcdesc}{execve}{path, args, env}
Execute the executable \var{path} with argument list \var{args},
! and environment \var{env},
! replacing the current process (i.e., the Python interpreter).
The argument list may be a tuple or list of strings.
The environment must be a dictionary mapping strings to strings.
--- 867,872 ----
\begin{funcdesc}{execve}{path, args, env}
Execute the executable \var{path} with argument list \var{args},
! and environment \var{env}, replacing the current process (the Python
! interpreter).
The argument list may be a tuple or list of strings.
The environment must be a dictionary mapping strings to strings.
***************
*** 1151,1168 ****
\begin{datadesc}{curdir}
! The constant string used by the OS to refer to the current directory,
! e.g.\ \code{'.'} for \POSIX{} or \code{':'} for the Macintosh.
\end{datadesc}
\begin{datadesc}{pardir}
! The constant string used by the OS to refer to the parent directory,
! e.g.\ \code{'..'} for \POSIX{} or \code{'::'} for the Macintosh.
\end{datadesc}
\begin{datadesc}{sep}
The character used by the OS to separate pathname components,
! e.g.\ \character{/} for \POSIX{} or \character{:} for the Macintosh.
! Note that knowing this is not sufficient to be able to parse or
! concatenate pathnames --- use \function{os.path.split()} and
\function{os.path.join()} --- but it is occasionally useful.
\end{datadesc}
--- 1152,1169 ----
\begin{datadesc}{curdir}
! The constant string used by the OS to refer to the current directory.
! For example: \code{'.'} for \POSIX{} or \code{':'} for the Macintosh.
\end{datadesc}
\begin{datadesc}{pardir}
! The constant string used by the OS to refer to the parent directory.
! For example: \code{'..'} for \POSIX{} or \code{'::'} for the Macintosh.
\end{datadesc}
\begin{datadesc}{sep}
The character used by the OS to separate pathname components,
! for example, \character{/} for \POSIX{} or \character{:} for the
! Macintosh. Note that knowing this is not sufficient to be able to
! parse or concatenate pathnames --- use \function{os.path.split()} and
\function{os.path.join()} --- but it is occasionally useful.
\end{datadesc}
***************
*** 1176,1180 ****
\begin{datadesc}{pathsep}
The character conventionally used by the OS to separate search patch
! components (as in \envvar{PATH}), e.g.\ \character{:} for \POSIX{} or
\character{;} for DOS and Windows.
\end{datadesc}
--- 1177,1181 ----
\begin{datadesc}{pathsep}
The character conventionally used by the OS to separate search patch
! components (as in \envvar{PATH}), such as \character{:} for \POSIX{} or
\character{;} for DOS and Windows.
\end{datadesc}
***************
*** 1187,1192 ****
\begin{datadesc}{linesep}
The string used to separate (or, rather, terminate) lines on the
! current platform. This may be a single character,
! e.g.\ \code{'\e n'} for \POSIX{} or \code{'\e r'} for MacOS, or multiple
! characters, e.g.\ \code{'\e r\e n'} for MS-DOS and MS Windows.
\end{datadesc}
--- 1188,1193 ----
\begin{datadesc}{linesep}
The string used to separate (or, rather, terminate) lines on the
! current platform. This may be a single character, such as \code{'\e
! n'} for \POSIX{} or \code{'\e r'} for MacOS, or multiple characters,
! for example, \code{'\e r\e n'} for MS-DOS and MS Windows.
\end{datadesc}
Index: libprofile.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libprofile.tex,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -r1.35 -r1.36
*** libprofile.tex 2001/07/02 21:22:39 1.35
--- libprofile.tex 2001/07/06 20:30:11 1.36
***************
*** 320,325 ****
\item[cumtime ]
! is the total time spent in this and all subfunctions (i.e., from
! invocation till exit). This figure is accurate \emph{even} for recursive
functions.
--- 320,325 ----
\item[cumtime ]
! is the total time spent in this and all subfunctions (from invocation
! till exit). This figure is accurate \emph{even} for recursive
functions.
***************
*** 332,340 ****
\end{description}
! When there are two numbers in the first column (e.g.: \samp{43/3}),
! then the latter is the number of primitive calls, and the former is
! the actual number of calls. Note that when the function does not
! recurse, these two values are the same, and only the single figure is
! printed.
\end{funcdesc}
--- 332,340 ----
\end{description}
! When there are two numbers in the first column (for example,
! \samp{43/3}), then the latter is the number of primitive calls, and
! the former is the actual number of calls. Note that when the function
! does not recurse, these two values are the same, and only the single
! figure is printed.
\end{funcdesc}
***************
*** 356,360 ****
\emph{no} file compatibility guaranteed with future versions of this
profiler, and there is no compatibility with files produced by other
! profilers (e.g., the old system profiler).
If several files are provided, all the statistics for identical
--- 356,360 ----
\emph{no} file compatibility guaranteed with future versions of this
profiler, and there is no compatibility with files produced by other
! profilers (such as the old system profiler).
If several files are provided, all the statistics for identical
***************
*** 378,382 ****
entries in a ``random'' order, as it was just after object
initialization and loading. If \method{strip_dirs()} causes two
! function names to be indistinguishable (i.e., they are on the same
line of the same filename, and have the same function name), then the
statistics for these two entries are accumulated into a single entry.
--- 378,382 ----
entries in a ``random'' order, as it was just after object
initialization and loading. If \method{strip_dirs()} causes two
! function names to be indistinguishable (they are on the same
line of the same filename, and have the same function name), then the
statistics for these two entries are accumulated into a single entry.
***************
*** 424,428 ****
Note that all sorts on statistics are in descending order (placing
most time consuming items first), where as name, file, and line number
! searches are in ascending order (i.e., alphabetical). The subtle
distinction between \code{'nfl'} and \code{'stdname'} is that the
standard name is a sort of the name as printed, which means that the
--- 424,428 ----
Note that all sorts on statistics are in descending order (placing
most time consuming items first), where as name, file, and line number
! searches are in ascending order (alphabetical). The subtle
distinction between \code{'nfl'} and \code{'stdname'} is that the
standard name is a sort of the name as printed, which means that the
***************
*** 539,546 ****
times, or call many functions, will typically accumulate this error.
The error that accumulates in this fashion is typically less than the
! accuracy of the clock (i.e., less than one clock tick), but it
\emph{can} accumulate and become very significant. This profiler
provides a means of calibrating itself for a given platform so that
! this error can be probabilistically (i.e., on the average) removed.
After the profiler is calibrated, it will be more accurate (in a least
square sense), but it will sometimes produce negative numbers (when
--- 539,546 ----
times, or call many functions, will typically accumulate this error.
The error that accumulates in this fashion is typically less than the
! accuracy of the clock (less than one clock tick), but it
\emph{can} accumulate and become very significant. This profiler
provides a means of calibrating itself for a given platform so that
! this error can be probabilistically (on the average) removed.
After the profiler is calibrated, it will be more accurate (in a least
square sense), but it will sometimes produce negative numbers (when
***************
*** 696,701 ****
The following derived profiler simulates the old style profiler,
providing errant results on recursive functions. The reason for the
! usefulness of this profiler is that it runs faster (i.e., less
! overhead) than the old profiler. It still creates all the caller
stats, and is quite useful when there is \emph{no} recursion in the
user's code. It is also a lot more accurate than the old profiler, as
--- 696,701 ----
The following derived profiler simulates the old style profiler,
providing errant results on recursive functions. The reason for the
! usefulness of this profiler is that it runs faster (less
! overhead) than the new profiler. It still creates all the caller
stats, and is quite useful when there is \emph{no} recursion in the
user's code. It is also a lot more accurate than the old profiler, as
Index: libre.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -r1.61 -r1.62
*** libre.tex 2001/04/18 17:26:20 1.61
--- libre.tex 2001/07/06 20:30:11 1.62
***************
*** 230,236 ****
For example, if the pattern is
\regexp{(?P<id>[a-zA-Z_]\e w*)}, the group can be referenced by its
! name in arguments to methods of match objects, such as \code{m.group('id')}
! or \code{m.end('id')}, and also by name in pattern text
! (e.g. \regexp{(?P=id)}) and replacement text (e.g. \code{\e g<id>}).
\item[\code{(?P=\var{name})}] Matches whatever text was matched by the
--- 230,237 ----
For example, if the pattern is
\regexp{(?P<id>[a-zA-Z_]\e w*)}, the group can be referenced by its
! name in arguments to methods of match objects, such as
! \code{m.group('id')} or \code{m.end('id')}, and also by name in
! pattern text (for example, \regexp{(?P=id)}) and replacement text
! (such as \code{\e g<id>}).
\item[\code{(?P=\var{name})}] Matches whatever text was matched by the
***************
*** 517,521 ****
The pattern may be a string or an RE object; if you need to specify
regular expression flags, you must use a RE object, or use
! embedded modifiers in a pattern; e.g.
\samp{sub("(?i)b+", "x", "bbbb BBBB")} returns \code{'x x'}.
--- 518,522 ----
The pattern may be a string or an RE object; if you need to specify
regular expression flags, you must use a RE object, or use
! embedded modifiers in a pattern; for example,
\samp{sub("(?i)b+", "x", "bbbb BBBB")} returns \code{'x x'}.
***************
*** 556,562 ****
\begin{excdesc}{error}
Exception raised when a string passed to one of the functions here
! is not a valid regular expression (e.g., unmatched parentheses) or
! when some other error occurs during compilation or matching. It is
! never an error if a string contains no match for a pattern.
\end{excdesc}
--- 557,564 ----
\begin{excdesc}{error}
Exception raised when a string passed to one of the functions here
! is not a valid regular expression (for example, it might contain
! unmatched parentheses) or when some other error occurs during
! compilation or matching. It is never an error if a string contains
! no match for a pattern.
\end{excdesc}
***************
*** 655,659 ****
argument, the result is a single string; if there are
multiple arguments, the result is a tuple with one item per argument.
! Without arguments, \var{group1} defaults to zero (i.e. the whole match
is returned).
If a \var{groupN} argument is zero, the corresponding return value is the
--- 657,661 ----
argument, the result is a single string; if there are
multiple arguments, the result is a tuple with one item per argument.
! Without arguments, \var{group1} defaults to zero (the whole match
is returned).
If a \var{groupN} argument is zero, the corresponding return value is the
Index: librexec.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/librexec.tex,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** librexec.tex 2001/06/22 18:21:53 1.15
--- librexec.tex 2001/07/06 20:30:11 1.16
***************
*** 33,37 ****
the \class{RExec} object doesn't make these calls --- they are made by
a module loader object that's part of the \class{RExec} object. This
! allows another level of flexibility, e.g. using packages.)
By providing an alternate \class{RHooks} object, we can control the
--- 33,38 ----
the \class{RExec} object doesn't make these calls --- they are made by
a module loader object that's part of the \class{RExec} object. This
! allows another level of flexibility, which can be useful when changing
! the mechanics of \keyword{import} within the restricted environment.)
By providing an alternate \class{RHooks} object, we can control the
***************
*** 136,140 ****
\begin{methoddesc}{r_unload}{module}
! Unload the module object \var{module} (i.e., remove it from the
restricted environment's \code{sys.modules} dictionary).
\end{methoddesc}
--- 137,141 ----
\begin{methoddesc}{r_unload}{module}
! Unload the module object \var{module} (remove it from the
restricted environment's \code{sys.modules} dictionary).
\end{methoddesc}
Index: librlcompleter.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/librlcompleter.tex,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** librlcompleter.tex 2000/12/01 15:25:23 1.5
--- librlcompleter.tex 2001/07/06 20:30:11 1.6
***************
*** 58,62 ****
If called for a dotted name, it will try to evaluate anything without
! obvious side-effects (i.e., functions will not be evaluated, but it
can generate calls to \method{__getattr__()}) upto the last part, and
find matches for the rest via the \function{dir()} function.
--- 58,62 ----
If called for a dotted name, it will try to evaluate anything without
! obvious side-effects (functions will not be evaluated, but it
can generate calls to \method{__getattr__()}) upto the last part, and
find matches for the rest via the \function{dir()} function.
Index: libsha.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsha.tex,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** libsha.tex 2000/09/18 15:34:57 1.6
--- libsha.tex 2001/07/06 20:30:11 1.7
***************
*** 43,47 ****
Update the sha object with the string \var{arg}. Repeated calls are
equivalent to a single call with the concatenation of all the
! arguments, i.e.\ \code{m.update(a); m.update(b)} is equivalent to
\code{m.update(a+b)}.
\end{methoddesc}
--- 43,47 ----
Update the sha object with the string \var{arg}. Repeated calls are
equivalent to a single call with the concatenation of all the
! arguments: \code{m.update(a); m.update(b)} is equivalent to
\code{m.update(a+b)}.
\end{methoddesc}
Index: libsignal.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsignal.tex,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** libsignal.tex 2001/05/10 15:57:17 1.20
--- libsignal.tex 2001/07/06 20:30:11 1.21
***************
*** 13,17 ****
\item
A handler for a particular signal, once set, remains installed until
! it is explicitly reset (i.e. Python emulates the BSD style interface
regardless of the underlying implementation), with the exception of
the handler for \constant{SIGCHLD}, which follows the underlying
--- 13,17 ----
\item
A handler for a particular signal, once set, remains installed until
! it is explicitly reset (Python emulates the BSD style interface
regardless of the underlying implementation), with the exception of
the handler for \constant{SIGCHLD}, which follows the underlying
***************
*** 26,31 ****
the Python user is concerned, they can only occur between the
``atomic'' instructions of the Python interpreter. This means that
! signals arriving during long calculations implemented purely in \C{}
! (e.g.\ regular expression matches on large bodies of text) may be
delayed for an arbitrary amount of time.
--- 26,31 ----
the Python user is concerned, they can only occur between the
``atomic'' instructions of the Python interpreter. This means that
! signals arriving during long calculations implemented purely in C
! (such as regular expression matches on large bodies of text) may be
delayed for an arbitrary amount of time.
***************
*** 98,102 ****
If \var{time} is non-zero, this function requests that a
\constant{SIGALRM} signal be sent to the process in \var{time} seconds.
! Any previously scheduled alarm is canceled (i.e.\ only one alarm can
be scheduled at any time). The returned value is then the number of
seconds before any previously set alarm was to have been delivered.
--- 98,102 ----
If \var{time} is non-zero, this function requests that a
\constant{SIGALRM} signal be sent to the process in \var{time} seconds.
! Any previously scheduled alarm is canceled (only one alarm can
be scheduled at any time). The returned value is then the number of
seconds before any previously set alarm was to have been delivered.
Index: libstdtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v
retrieving revision 1.63
retrieving revision 1.64
diff -C2 -r1.63 -r1.64
*** libstdtypes.tex 2001/07/05 15:27:19 1.63
--- libstdtypes.tex 2001/07/06 20:30:11 1.64
***************
*** 446,450 ****
\item[(2)] If \var{i} or \var{j} is negative, the index is relative to
! the end of the string, i.e., \code{len(\var{s}) + \var{i}} or
\code{len(\var{s}) + \var{j}} is substituted. But note that \code{-0} is
still \code{0}.
--- 446,450 ----
\item[(2)] If \var{i} or \var{j} is negative, the index is relative to
! the end of the string: \code{len(\var{s}) + \var{i}} or
\code{len(\var{s}) + \var{j}} is substituted. But note that \code{-0} is
still \code{0}.
***************
*** 539,543 ****
\begin{methoddesc}[string]{istitle}{}
! Return true if the string is a titlecased string, i.e.\ uppercase
characters may only follow uncased characters and lowercase characters
only cased ones. Return false otherwise.
--- 539,543 ----
\begin{methoddesc}[string]{istitle}{}
! Return true if the string is a titlecased string: uppercase
characters may only follow uncased characters and lowercase characters
only cased ones. Return false otherwise.
***************
*** 629,633 ****
\begin{methoddesc}[string]{title}{}
! Return a titlecased version of, i.e.\ words start with uppercase
characters, all remaining cased characters are lowercase.
\end{methoddesc}
--- 629,633 ----
\begin{methoddesc}[string]{title}{}
! Return a titlecased version of the string: words start with uppercase
characters, all remaining cased characters are lowercase.
\end{methoddesc}
***************
*** 1009,1013 ****
Modifying this dictionary will actually change the module's symbol
table, but direct assignment to the \member{__dict__} attribute is not
! possible (i.e., you can write \code{\var{m}.__dict__['a'] = 1}, which
defines \code{\var{m}.a} to be \code{1}, but you can't write
\code{\var{m}.__dict__ = \{\}}.
--- 1009,1013 ----
Modifying this dictionary will actually change the module's symbol
table, but direct assignment to the \member{__dict__} attribute is not
! possible (you can write \code{\var{m}.__dict__['a'] = 1}, which
defines \code{\var{m}.a} to be \code{1}, but you can't write
\code{\var{m}.__dict__ = \{\}}.
***************
*** 1088,1092 ****
Like function objects, methods objects support getting
arbitrary attributes. However, since method attributes are actually
! stored on the underlying function object (i.e. \code{meth.im_func}),
setting method attributes on either bound or unbound methods is
disallowed. Attempting to set a method attribute results in a
--- 1088,1092 ----
Like function objects, methods objects support getting
arbitrary attributes. However, since method attributes are actually
! stored on the underlying function object (\code{meth.im_func}),
setting method attributes on either bound or unbound methods is
disallowed. Attempting to set a method attribute results in a
***************
*** 1168,1172 ****
\function{open()}\bifuncindex{open} described in section
\ref{built-in-funcs}, ``Built-in Functions.'' They are also returned
! by some other built-in functions and methods, e.g.,
\function{os.popen()} and \function{os.fdopen()} and the
\method{makefile()} method of socket objects.
--- 1168,1172 ----
\function{open()}\bifuncindex{open} described in section
\ref{built-in-funcs}, ``Built-in Functions.'' They are also returned
! by some other built-in functions and methods, such as
\function{os.popen()} and \function{os.fdopen()} and the
\method{makefile()} method of socket objects.
***************
*** 1207,1214 ****
underlying implementation to request I/O operations from the
operating system. This can be useful for other, lower level
! interfaces that use file descriptors, e.g.\ module
! \refmodule{fcntl}\refbimodindex{fcntl} or \function{os.read()} and
! friends. \strong{Note:} File-like objects which do not have a real
! file descriptor should \emph{not} provide this method!
\end{methoddesc}
--- 1207,1215 ----
underlying implementation to request I/O operations from the
operating system. This can be useful for other, lower level
! interfaces that use file descriptors, such as the
! \refmodule{fcntl}\refbimodindex{fcntl} module or
! \function{os.read()} and friends. \strong{Note:} File-like objects
! which do not have a real file descriptor should \emph{not} provide
! this method!
\end{methoddesc}
***************
*** 1230,1234 ****
The advantage of leaving the newline on is that an empty string
can be returned to mean \EOF{} without being ambiguous. Another
! advantage is that (in cases where it might matter, e.g. if you
want to make an exact copy of a file while scanning its lines)
you can tell whether the last line of a file ended in a newline
--- 1231,1235 ----
The advantage of leaving the newline on is that an empty string
can be returned to mean \EOF{} without being ambiguous. Another
! advantage is that (in cases where it might matter, for example. if you
want to make an exact copy of a file while scanning its lines)
you can tell whether the last line of a file ended in a newline
***************
*** 1357,1370 ****
\begin{memberdesc}[object]{__methods__}
! List of the methods of many built-in object types,
! e.g., \code{[].__methods__} yields
! \code{['append', 'count', 'index', 'insert', 'pop', 'remove',
! 'reverse', 'sort']}. This usually does not need to be explicitly
! provided by the object.
\end{memberdesc}
\begin{memberdesc}[object]{__members__}
Similar to \member{__methods__}, but lists data attributes. This
! usually does not need to be explicitly provided by the object.
\end{memberdesc}
--- 1358,1371 ----
\begin{memberdesc}[object]{__methods__}
! List of the methods of many built-in object types. For example,
! \code{[].__methods__} yields \code{['append', 'count', 'index',
! 'insert', 'pop', 'remove', 'reverse', 'sort']}. This usually does not
! need to be explicitly provided by the object.
\end{memberdesc}
\begin{memberdesc}[object]{__members__}
Similar to \member{__methods__}, but lists data attributes. This
! usually does not need to be explicitly provided by the object, and
! need not include the names of the attributes defined in this section.
\end{memberdesc}
***************
*** 1374,1377 ****
\begin{memberdesc}[class]{__bases__}
! The tuple of base classes of a class object.
\end{memberdesc}
--- 1375,1379 ----
\begin{memberdesc}[class]{__bases__}
! The tuple of base classes of a class object. If there are no base
! classes, this will be an empty tuple.
\end{memberdesc}
Index: libstringio.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstringio.tex,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** libstringio.tex 2000/11/28 16:24:28 1.5
--- libstringio.tex 2001/07/06 20:30:11 1.6
***************
*** 18,22 ****
The \class{StringIO} object can accept either Unicode or 8-bit
strings, but mixing the two may take some care. If both are used,
! 8-bit strings that cannot be interpreted as 7-bit \ASCII{} (i.e., that
use the 8th bit) will cause a \exception{UnicodeError} to be raised
when \method{getvalue()} is called.
--- 18,22 ----
The \class{StringIO} object can accept either Unicode or 8-bit
strings, but mixing the two may take some care. If both are used,
! 8-bit strings that cannot be interpreted as 7-bit \ASCII{} (that
use the 8th bit) will cause a \exception{UnicodeError} to be raised
when \method{getvalue()} is called.
Index: libstruct.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstruct.tex,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** libstruct.tex 2001/06/15 14:13:07 1.29
--- libstruct.tex 2001/07/06 20:30:11 1.30
***************
*** 34,39 ****
\textrm{\ldots})}) according to the given format. The result is a
tuple even if it contains exactly one item. The string must contain
! exactly the amount of data required by the format (i.e.
! \code{len(\var{string})} must equal \code{calcsize(\var{fmt})}).
\end{funcdesc}
--- 34,39 ----
\textrm{\ldots})}) according to the given format. The result is a
tuple even if it contains exactly one item. The string must contain
! exactly the amount of data required by the format
! (\code{len(\var{string})} must equal \code{calcsize(\var{fmt})}).
\end{funcdesc}
***************
*** 79,84 ****
! A format character may be preceded by an integral repeat count;
! e.g.\ the format string \code{'4h'} means exactly the same as
\code{'hhhh'}.
--- 79,84 ----
! A format character may be preceded by an integral repeat count. For
! example, the format string \code{'4h'} means exactly the same as
\code{'hhhh'}.
***************
*** 88,92 ****
For the \character{s} format character, the count is interpreted as the
size of the string, not a repeat count like for the other format
! characters; e.g. \code{'10s'} means a single 10-byte string, while
\code{'10c'} means 10 characters. For packing, the string is
truncated or padded with null bytes as appropriate to make it fit.
--- 88,92 ----
For the \character{s} format character, the count is interpreted as the
size of the string, not a repeat count like for the other format
! characters; for example, \code{'10s'} means a single 10-byte string, while
\code{'10c'} means 10 characters. For packing, the string is
truncated or padded with null bytes as appropriate to make it fit.
***************
*** 134,139 ****
Native byte order is big-endian or little-endian, depending on the
! host system (e.g. Motorola and Sun are big-endian; Intel and DEC are
! little-endian).
Native size and alignment are determined using the C compiler's
--- 134,139 ----
Native byte order is big-endian or little-endian, depending on the
! host system. For example, Motorola and Sun processors are big-endian;
! Intel and DEC processors are little-endian.
Native size and alignment are determined using the C compiler's
***************
*** 157,161 ****
little-endian.
! There is no way to indicate non-native byte order (i.e. force
byte-swapping); use the appropriate choice of \character{<} or
\character{>}.
--- 157,161 ----
little-endian.
! There is no way to indicate non-native byte order (force
byte-swapping); use the appropriate choice of \character{<} or
\character{>}.
***************
*** 183,190 ****
Hint: to align the end of a structure to the alignment requirement of
a particular type, end the format with the code for that type with a
! repeat count of zero, e.g.\ the format \code{'llh0l'} specifies two
! pad bytes at the end, assuming longs are aligned on 4-byte boundaries.
! This only works when native size and alignment are in effect;
! standard size and alignment does not enforce any alignment.
\begin{seealso}
--- 183,190 ----
Hint: to align the end of a structure to the alignment requirement of
a particular type, end the format with the code for that type with a
! repeat count of zero. For example, the format \code{'llh0l'}
! specifies two pad bytes at the end, assuming longs are aligned on
! 4-byte boundaries. This only works when native size and alignment are
! in effect; standard size and alignment does not enforce any alignment.
\begin{seealso}
Index: libthreading.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libthreading.tex,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** libthreading.tex 2001/05/31 20:24:07 1.8
--- libthreading.tex 2001/07/06 20:30:11 1.9
***************
*** 151,158 ****
To lock the lock, a thread calls its \method{acquire()} method; this
returns once the thread owns the lock. To unlock the lock, a
! thread calls its \method{release()} method. \method{acquire()}/\method{release()} call pairs
! may be nested; only the final \method{release()} (i.e. the \method{release()} of the
! outermost pair) resets the lock to unlocked and allows another
! thread blocked in \method{acquire()} to proceed.
\begin{methoddesc}{acquire}{\optional{blocking\code{ = 1}}}
--- 151,159 ----
To lock the lock, a thread calls its \method{acquire()} method; this
returns once the thread owns the lock. To unlock the lock, a
! thread calls its \method{release()} method.
! \method{acquire()}/\method{release()} call pairs may be nested; only
! the final \method{release()} (the \method{release()} of the outermost
! pair) resets the lock to unlocked and allows another thread blocked in
! \method{acquire()} to proceed.
\begin{methoddesc}{acquire}{\optional{blocking\code{ = 1}}}
***************
*** 454,458 ****
created. These are thread objects corresponding to ``alien
threads''. These are threads of control started outside the
! threading module, e.g. directly from C code. Dummy thread objects
have limited functionality; they are always considered alive,
active, and daemonic, and cannot be \method{join()}ed. They are never
--- 455,459 ----
created. These are thread objects corresponding to ``alien
threads''. These are threads of control started outside the
! threading module, such as directly from C code. Dummy thread objects
have limited functionality; they are always considered alive,
active, and daemonic, and cannot be \method{join()}ed. They are never
Index: libtime.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtime.tex,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -r1.39 -r1.40
*** libtime.tex 2001/06/29 15:39:53 1.39
--- libtime.tex 2001/07/06 20:30:11 1.40
***************
*** 81,85 ****
\begin{tableiii}{r|l|l}{textrm}{Index}{Field}{Values}
! \lineiii{0}{year}{(e.g.\ 1993)}
\lineiii{1}{month}{range [1,12]}
\lineiii{2}{day}{range [1,31]}
--- 81,85 ----
\begin{tableiii}{r|l|l}{textrm}{Index}{Field}{Values}
! \lineiii{0}{year}{(for example, 1993)}
\lineiii{1}{month}{range [1,12]}
\lineiii{2}{day}{range [1,31]}
***************
*** 286,291 ****
\begin{datadesc}{timezone}
The offset of the local (non-DST) timezone, in seconds west of UTC
! (i.e. negative in most of Western Europe, positive in the US, zero in
! the UK).
\end{datadesc}
--- 286,291 ----
\begin{datadesc}{timezone}
The offset of the local (non-DST) timezone, in seconds west of UTC
! (negative in most of Western Europe, positive in the US, zero in the
! UK).
\end{datadesc}
Index: libuser.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuser.tex,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** libuser.tex 2000/10/18 17:43:06 1.16
--- libuser.tex 2001/07/06 20:30:11 1.17
***************
*** 25,29 ****
The \module{user} module looks for a file \file{.pythonrc.py} in the user's
home directory and if it can be opened, executes it (using
! \function{execfile()}\bifuncindex{execfile}) in its own (i.e. the
module \module{user}'s) global namespace. Errors during this phase
are not caught; that's up to the program that imports the
--- 25,29 ----
The \module{user} module looks for a file \file{.pythonrc.py} in the user's
home directory and if it can be opened, executes it (using
! \function{execfile()}\bifuncindex{execfile}) in its own (the
module \module{user}'s) global namespace. Errors during this phase
are not caught; that's up to the program that imports the
Index: libwinreg.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libwinreg.tex,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** libwinreg.tex 2000/11/30 07:12:54 1.6
--- libwinreg.tex 2001/07/06 20:30:11 1.7
***************
*** 381,386 ****
print "Yes"
\end{verbatim}
! will print \code{Yes} if the handle is currently valid (i.e.,
! has not been closed or detached).
The object also support comparison semantics, so handle
--- 381,386 ----
print "Yes"
\end{verbatim}
! will print \code{Yes} if the handle is currently valid (has not been
! closed or detached).
The object also support comparison semantics, so handle
Index: libxmllib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libxmllib.tex,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** libxmllib.tex 2000/11/28 06:39:28 1.30
--- libxmllib.tex 2001/07/06 20:30:11 1.31
***************
*** 268,272 ****
Tag and attribute names that are defined in an XML namespace are
handled as if the name of the tag or element consisted of the
! namespace (i.e. the URL that defines the namespace) followed by a
space and the name of the tag or attribute. For instance, the tag
\code{<html xmlns='http://www.w3.org/TR/REC-html40'>} is treated as if
--- 268,272 ----
Tag and attribute names that are defined in an XML namespace are
handled as if the name of the tag or element consisted of the
! namespace (the URL that defines the namespace) followed by a
space and the name of the tag or attribute. For instance, the tag
\code{<html xmlns='http://www.w3.org/TR/REC-html40'>} is treated as if
Index: libzipfile.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libzipfile.tex,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** libzipfile.tex 2001/05/11 15:49:19 1.11
--- libzipfile.tex 2001/07/06 20:30:11 1.12
***************
*** 80,84 ****
\begin{classdesc}{ZipFile}{file\optional{, mode\optional{, compression}}}
Open a ZIP file, where \var{file} can be either a path to a file
! (i.e. a string) or a file-like object. The \var{mode} parameter
should be \code{'r'} to read an existing file, \code{'w'} to
truncate and write a new file, or \code{'a'} to append to an
--- 80,84 ----
\begin{classdesc}{ZipFile}{file\optional{, mode\optional{, compression}}}
Open a ZIP file, where \var{file} can be either a path to a file
! (a string) or a file-like object. The \var{mode} parameter
should be \code{'r'} to read an existing file, \code{'w'} to
truncate and write a new file, or \code{'a'} to append to an
Index: xmlsaxreader.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/xmlsaxreader.tex,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** xmlsaxreader.tex 2000/10/12 20:05:09 1.1
--- xmlsaxreader.tex 2001/07/06 20:30:11 1.2
***************
*** 93,97 ****
\begin{methoddesc}[XMLReader]{parse}{source}
Process an input source, producing SAX events. The \var{source}
! object can be a system identifier (i.e. a string identifying the
input source -- typically a file name or an URL), a file-like
object, or an \class{InputSource} object. When \method{parse()}
--- 93,97 ----
\begin{methoddesc}[XMLReader]{parse}{source}
Process an input source, producing SAX events. The \var{source}
! object can be a system identifier (a string identifying the
input source -- typically a file name or an URL), a file-like
object, or an \class{InputSource} object. When \method{parse()}