[Python-checkins] python/dist/src/Doc/lib libstdtypes.tex, 1.144, 1.145 libstring.tex, 1.54, 1.55

perky at users.sourceforge.net perky at users.sourceforge.net
Tue Dec 16 21:49:05 EST 2003


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

Modified Files:
	libstdtypes.tex libstring.tex 
Log Message:
Update documentations for str.rsplit() with Alex Martelli's rewrite.


Index: libstdtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v
retrieving revision 1.144
retrieving revision 1.145
diff -C2 -d -r1.144 -r1.145
*** libstdtypes.tex	15 Dec 2003 18:49:53 -0000	1.144
--- libstdtypes.tex	17 Dec 2003 02:49:03 -0000	1.145
***************
*** 695,713 ****
  \end{methoddesc}
  
! \begin{methoddesc}[string]{rsplit}{\optional{, sep\optional{, maxsplit}}}
! Return a list of the words of the string, scanning the string from
! the end working forward.  The resulting list of words is in the
! same order as \function{split()}.  If the optional second argument
! \var{sep} is absent or \code{None}, the words are separated by
! arbitrary strings of whitespace characters (space, tab, newline,
! return, formfeed).  If the second argument \var{sep} is present and
! not \code{None}, it specifies a string to be used as the word
! separator.  The returned list will then have one more item than the
! number of non-overlapping occurrences of the separator in the string.
! The optional third argument \var{maxsplit} defaults to 0.  If it
! is nonzero, at most \var{maxsplit} number of splits occur, and the
! remainder of the string is returned as the first element of the
! list (thus, the list will have at most \code{\var{maxsplit}+1}
! elements).
  \versionadded{2.4}
  \end{methoddesc}
--- 695,703 ----
  \end{methoddesc}
  
! \begin{methoddesc}[string]{rsplit}{\optional{sep \optional{,maxsplit}}}
! 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}
  \end{methoddesc}

Index: libstring.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstring.tex,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** libstring.tex	15 Dec 2003 18:49:53 -0000	1.54
--- libstring.tex	17 Dec 2003 02:49:03 -0000	1.55
***************
*** 217,233 ****
  
  \begin{funcdesc}{rsplit}{s\optional{, sep\optional{, maxsplit}}}
!   Return a list of the words of the string \var{s}, scanning \var{s} from
!   the end working forward.  The resulting list of words is in the same
!   order as \function{split()}.  If the optional second argument \var{sep}
!   is absent or \code{None}, the words are separated by arbitrary strings
!   of whitespace characters (space, tab, newline, return, formfeed).
!   If the second argument \var{sep} is present and not \code{None}, it
!   specifies a string to be used as the word separator.  The returned
!   list will then have one more item than the number of non-overlapping
!   occurrences of the separator in the string.  The optional third argument
!   \var{maxsplit} defaults to 0.  If it is nonzero, at most \var{maxsplit}
!   number of splits occur, and the remainder of the string is returned
!   as the first element of the list (thus, the list will have at most
!   \code{\var{maxsplit}+1} elements).
    \versionadded{2.4}
  \end{funcdesc}
--- 217,228 ----
  
  \begin{funcdesc}{rsplit}{s\optional{, sep\optional{, maxsplit}}}
!   Return a list of the words of the string \var{s}, scanning \var{s}
!   from the end.  To all intents and purposes, the resulting list of
!   words is the same as returned by \function{split()}, except when the
!   optional third argument \var{maxsplit} is explicitly specified and
!   nonzero.  When \var{maxsplit} is nonzero, at most \var{maxsplit}
!   number of splits -- the \em{rightmost} ones -- occur, and the remainder
!   of the string is returned as the first element of the list (thus, the
!   list will have at most \code{\var{maxsplit}+1} elements).
    \versionadded{2.4}
  \end{funcdesc}





More information about the Python-checkins mailing list