[Python-checkins] CVS: python/dist/src/Doc/lib libstdtypes.tex,1.80.6.1,1.80.6.2

Michael Hudson mwh@users.sourceforge.net
2002年3月16日 10:19:36 -0800


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv28149/Doc/lib
Modified Files:
 Tag: release22-maint
	libstdtypes.tex 
Log Message:
Backport Tim's work on getting file.truncate working better on Win32.
"cvs diff | patch" managed to stick the NEWS item in the 2.2 final
section! I wonder which silly man wrote patch <wink>.
Index: libstdtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v
retrieving revision 1.80.6.1
retrieving revision 1.80.6.2
diff -C2 -d -r1.80.6.1 -r1.80.6.2
*** libstdtypes.tex	28 Dec 2001 04:37:37 -0000	1.80.6.1
--- libstdtypes.tex	16 Mar 2002 18:19:33 -0000	1.80.6.2
***************
*** 162,166 ****
 \subsection{Numeric Types \label{typesnumeric}}
 
! There are four numeric types: \dfn{plain integers}, \dfn{long integers}, 
 \dfn{floating point numbers}, and \dfn{complex numbers}.
 Plain integers (also just called \dfn{integers})
--- 162,166 ----
 \subsection{Numeric Types \label{typesnumeric}}
 
! There are four numeric types: \dfn{plain integers}, \dfn{long integers},
 \dfn{floating point numbers}, and \dfn{complex numbers}.
 Plain integers (also just called \dfn{integers})
***************
*** 179,183 ****
 Complex numbers have a real and imaginary part, which are both
 implemented using \ctype{double} in C. To extract these parts from
! a complex number \var{z}, use \code{\var{z}.real} and \code{\var{z}.imag}. 
 
 Numbers are created by numeric literals or as the result of built-in
--- 179,183 ----
 Complex numbers have a real and imaginary part, which are both
 implemented using \ctype{double} in C. To extract these parts from
! a complex number \var{z}, use \code{\var{z}.real} and \code{\var{z}.imag}.
 
 Numbers are created by numeric literals or as the result of built-in
***************
*** 249,253 ****
 \item[(1)]
 For (plain or long) integer division, the result is an integer.
! The result is always rounded towards minus infinity: 1/2 is 0, 
 (-1)/2 is -1, 1/(-2) is -1, and (-1)/(-2) is 0. Note that the result
 is a long integer if either operand is a long integer, regardless of
--- 249,253 ----
 \item[(1)]
 For (plain or long) integer division, the result is an integer.
! The result is always rounded towards minus infinity: 1/2 is 0,
 (-1)/2 is -1, 1/(-2) is -1, and (-1)/(-2) is 0. Note that the result
 is a long integer if either operand is a long integer, regardless of
***************
*** 473,477 ****
 \code{len(\var{s}) + \var{j}} is substituted. But note that \code{-0} is
 still \code{0}.
! 
 \item[(3)] The slice of \var{s} from \var{i} to \var{j} is defined as
 the sequence of items with index \var{k} such that \code{\var{i} <=
--- 473,477 ----
 \code{len(\var{s}) + \var{j}} is substituted. But note that \code{-0} is
 still \code{0}.
! 
 \item[(3)] The slice of \var{s} from \var{i} to \var{j} is defined as
 the sequence of items with index \var{k} such that \code{\var{i} <=
***************
*** 809,813 ****
 Additional string operations are defined in standard modules
 \refmodule{string}\refstmodindex{string} and
! \refmodule{re}.\refstmodindex{re} 
 
 
--- 809,813 ----
 Additional string operations are defined in standard modules
 \refmodule{string}\refstmodindex{string} and
! \refmodule{re}.\refstmodindex{re}
 
 
***************
*** 882,886 ****
 deprecated since Python 1.4.
 
! \item[(2)] Raises an exception when \var{x} is not a list object. The 
 \method{extend()} method is experimental and not supported by
 mutable sequence types other than lists.
--- 882,886 ----
 deprecated since Python 1.4.
 
! \item[(2)] Raises an exception when \var{x} is not a list object. The
 \method{extend()} method is experimental and not supported by
 mutable sequence types other than lists.
***************
*** 1035,1039 ****
 File objects\obindex{file} are implemented using C's \code{stdio}
 package and can be created with the built-in constructor
! \function{file()}\bifuncindex{file} described in section 
 \ref{built-in-funcs}, ``Built-in Functions.''\footnote{\function{file()}
 is new in Python 2.2. The older built-in \function{open()} is an
--- 1035,1039 ----
 File objects\obindex{file} are implemented using C's \code{stdio}
 package and can be created with the built-in constructor
! \function{file()}\bifuncindex{file} described in section
 \ref{built-in-funcs}, ``Built-in Functions.''\footnote{\function{file()}
 is new in Python 2.2. The older built-in \function{open()} is an
***************
*** 1101,1108 ****
 Read one entire line from the file. A trailing newline character is
 kept in the string\footnote{
! 	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
 	or not (yes this happens!).
--- 1101,1108 ----
 Read one entire line from the file. A trailing newline character is
 kept in the string\footnote{
! 	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
 	or not (yes this happens!).
***************
*** 1153,1161 ****
 
 \begin{methoddesc}[file]{truncate}{\optional{size}}
! Truncate the file's size. If the optional \var{size} argument
 present, the file is truncated to (at most) that size. The size
! defaults to the current position. Availability of this function
! depends on the operating system version (for example, not all
! \UNIX{} versions support this operation).
 \end{methoddesc}
 
--- 1153,1165 ----
 
 \begin{methoddesc}[file]{truncate}{\optional{size}}
! Truncate the file's size. If the optional \var{size} argument is
 present, the file is truncated to (at most) that size. The size
! defaults to the current position. The current file position is
! not changed. Note that if a specified size exceeds the file's
! current size, the result is platform-dependent: possibilities
! include that file may remain unchanged, increase to the specified
! size as if zero-filled, or increase to the specified size with
! undefined new content.
! Availability: Windows, many \UNIX variants.
 \end{methoddesc}
 

AltStyle によって変換されたページ (->オリジナル) /