diff options
author | Hye-Shik Chang <hyeshik@gmail.com> | 2003-12-17 02:49:03 (GMT) |
---|---|---|
committer | Hye-Shik Chang <hyeshik@gmail.com> | 2003-12-17 02:49:03 (GMT) |
commit | c6f066f9a3d9f4b774548477c1e2f7d140828e6d (patch) | |
tree | a5c65454f50116b81588e4c5945dfceceaaa2031 /Doc/lib/libstring.tex | |
parent | 4612bc587b002841644d854cc3fd441e0ef71855 (diff) | |
download | cpython-c6f066f9a3d9f4b774548477c1e2f7d140828e6d.zip cpython-c6f066f9a3d9f4b774548477c1e2f7d140828e6d.tar.gz cpython-c6f066f9a3d9f4b774548477c1e2f7d140828e6d.tar.bz2 |
Update documentations for str.rsplit() with Alex Martelli's rewrite.
Diffstat (limited to 'Doc/lib/libstring.tex')
-rw-r--r-- | Doc/lib/libstring.tex | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/Doc/lib/libstring.tex b/Doc/lib/libstring.tex index 11054e2..950291c 100644 --- a/Doc/lib/libstring.tex +++ b/Doc/lib/libstring.tex @@ -216,19 +216,14 @@ The functions defined in this module are: \end{funcdesc} \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). + 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} |