[Python-checkins] python/dist/src/Doc/lib libstdtypes.tex, 1.147, 1.148

fdrake at users.sourceforge.net fdrake at users.sourceforge.net
Tue Dec 30 17:21:21 EST 2003


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv5238

Modified Files:
	libstdtypes.tex 
Log Message:
fix a variety of markup bugs


Index: libstdtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v
retrieving revision 1.147
retrieving revision 1.148
diff -C2 -d -r1.147 -r1.148
*** libstdtypes.tex	30 Dec 2003 17:17:17 -0000	1.147
--- libstdtypes.tex	30 Dec 2003 22:21:18 -0000	1.148
***************
*** 698,702 ****
  Return a list of the words in the string, using \var{sep} as the
  delimiter string.  If \var{maxsplit} is given, at most \var{maxsplit}
! splits are done, the \em{rightmost} ones.  If \var{sep} is not specified
  or \code{None}, any whitespace string is a separator.
  \versionadded{2.4}
--- 698,702 ----
  Return a list of the words in the string, using \var{sep} as the
  delimiter string.  If \var{maxsplit} is given, at most \var{maxsplit}
! splits are done, the \emph{rightmost} ones.  If \var{sep} is not specified
  or \code{None}, any whitespace string is a separator.
  \versionadded{2.4}
***************
*** 804,808 ****
  
  If \var{format} requires a single argument, \var{values} may be a
! single non-tuple object. \footnote{To format only a tuple you
  should therefore provide a singleton tuple whose only element
  is the tuple to be formatted.}  Otherwise, \var{values} must be a tuple with
--- 804,808 ----
  
  If \var{format} requires a single argument, \var{values} may be a
! single non-tuple object.\footnote{To format only a tuple you
  should therefore provide a singleton tuple whose only element
  is the tuple to be formatted.}  Otherwise, \var{values} must be a tuple with
***************
*** 929,933 ****
  
  Additional string operations are defined in standard modules
! \refmodule{string}\refstmodindex{string} and
  \refmodule{re}.\refstmodindex{re}
  
--- 929,933 ----
  
  Additional string operations are defined in standard modules
! \refmodule{string}\refstmodindex{string}\ and
  \refmodule{re}.\refstmodindex{re}
  
***************
*** 935,943 ****
  \subsubsection{XRange Type \label{typesseq-xrange}}
  
! The xrange\obindex{xrange} type is an immutable sequence which is
! commonly used for looping.  The advantage of the xrange type is that an
! xrange object will always take the same amount of memory, no matter the
! size of the range it represents.  There are no consistent performance
! advantages.
  
  XRange objects have very little behavior: they only support indexing,
--- 935,943 ----
  \subsubsection{XRange Type \label{typesseq-xrange}}
  
! The \class{xrange}\obindex{xrange} type is an immutable sequence which
! is commonly used for looping.  The advantage of the \class{xrange}
! type is that an \class{xrange} object will always take the same amount
! of memory, no matter the size of the range it represents.  There are
! no consistent performance advantages.
  
  XRange objects have very little behavior: they only support indexing,
***************
*** 986,991 ****
    \lineiii{\var{s}.reverse()}
  	{reverses the items of \var{s} in place}{(7)}
!   \lineiii{\var{s}.sort(\optional{\var{cmp}=None\optional{, \var{key}=None
!                         \optional{, \var{reverse}=False}}})}
  	{sort the items of \var{s} in place}{(7), (8), (9), (10)}
  \end{tableiii}
--- 986,991 ----
    \lineiii{\var{s}.reverse()}
  	{reverses the items of \var{s} in place}{(7)}
!   \lineiii{\var{s}.sort(\optional{\var{cmp}\optional{,
!                         \var{key}\optional{, \var{reverse}}}})}
  	{sort the items of \var{s} in place}{(7), (8), (9), (10)}
  \end{tableiii}
***************
*** 1061,1069 ****
  
    \versionchanged[Support for \code{None} as an equivalent to omitting
!   \var{cmpfunc} was added]{2.3}
  
    \versionchanged[Support for \var{key} and \var{reverse} was added]{2.4}
  
! \item[(9)]  Starting with Python 2.3, the \method{sort()} method is
    guaranteed to be stable.  A sort is stable if it guarantees not to
    change the relative order of elements that compare equal --- this is
--- 1061,1069 ----
  
    \versionchanged[Support for \code{None} as an equivalent to omitting
!   \var{cmp} was added]{2.3}
  
    \versionchanged[Support for \var{key} and \var{reverse} was added]{2.4}
  
! \item[(9)] Starting with Python 2.3, the \method{sort()} method is
    guaranteed to be stable.  A sort is stable if it guarantees not to
    change the relative order of elements that compare equal --- this is
***************
*** 1072,1079 ****
  
  \item[(10)] While a list is being sorted, the effect of attempting to
!   mutate, or even inspect, the list is undefined.  The C implementation
!   of Python 2.3 makes the list appear empty for the duration, and raises
!   \exception{ValueError} if it can detect that the list has been
!   mutated during a sort.
  \end{description}
  
--- 1072,1079 ----
  
  \item[(10)] While a list is being sorted, the effect of attempting to
!   mutate, or even inspect, the list is undefined.  The C
!   implementation of Python 2.3 and newer makes the list appear empty
!   for the duration, and raises \exception{ValueError} if it can detect
!   that the list has been mutated during a sort.
  \end{description}
  
***************
*** 1348,1353 ****
  \ref{built-in-funcs}, ``Built-in Functions.''\footnote{\function{file()}
  is new in Python 2.2.  The older built-in \function{open()} is an
! alias for \function{file()}.}
! File objects are also returned
  by some other built-in functions and methods, such as
  \function{os.popen()} and \function{os.fdopen()} and the
--- 1348,1352 ----
  \ref{built-in-funcs}, ``Built-in Functions.''\footnote{\function{file()}
  is new in Python 2.2.  The older built-in \function{open()} is an
! alias for \function{file()}.}  File objects are also returned
  by some other built-in functions and methods, such as
  \function{os.popen()} and \function{os.fdopen()} and the
***************
*** 1429,1433 ****
  \begin{methoddesc}[file]{readline}{\optional{size}}
    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
  	returning an empty string is then an unambiguous \EOF{}
--- 1428,1433 ----
  \begin{methoddesc}[file]{readline}{\optional{size}}
    Read one entire line from the file.  A trailing newline character is
!   kept in the string (but may be absent when a file ends with an
!   incomplete line).\footnote{
  	The advantage of leaving the newline on is that
  	returning an empty string is then an unambiguous \EOF{}
***************
*** 1437,1442 ****
  	to tell whether the last line of a file ended in a newline
  	or not (yes this happens!).
!   } (but may be absent when a file ends with an
!   incomplete line).  If the \var{size} argument is present and
    non-negative, it is a maximum byte count (including the trailing
    newline) and an incomplete line may be returned.
--- 1437,1441 ----
  	to tell whether the last line of a file ended in a newline
  	or not (yes this happens!).
!   }  If the \var{size} argument is present and
    non-negative, it is a maximum byte count (including the trailing
    newline) and an incomplete line may be returned.
***************
*** 1460,1464 ****
    This method returns the same thing as \code{iter(f)}.
    \versionadded{2.1}
!   \deprecated{2.3}{Use \code{for line in file} instead.}
  \end{methoddesc}
  
--- 1459,1463 ----
    This method returns the same thing as \code{iter(f)}.
    \versionadded{2.1}
!   \deprecated{2.3}{Use \samp{for \var{line} in \var{file}} instead.}
  \end{methoddesc}
  
***************
*** 1607,1611 ****
  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__ = \{\}}).
  
  Modules built into the interpreter are written like this:
--- 1606,1611 ----
  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__ = \{\}}).  Modifying \member{__dict__} directly
! is not recommended.
  
  Modules built into the interpreter are written like this:
***************
*** 1725,1729 ****
  Type objects represent the various object types.  An object's type is
  accessed by the built-in function \function{type()}.  There are no special
! operations on types.  The standard module \module{types} defines names
  for all standard built-in types.
  \bifuncindex{type}
--- 1725,1729 ----
  Type objects represent the various object types.  An object's type is
  accessed by the built-in function \function{type()}.  There are no special
! operations on types.  The standard module \refmodule{types} defines names
  for all standard built-in types.
  \bifuncindex{type}





More information about the Python-checkins mailing list