Commit 353da424 authored by Guido van Rossum's avatar Guido van Rossum

Clarify that capwords() removes leading/trailing whitespace.

Remove references to regsub, which is obsolescent.
parent 0ff8d279
...@@ -96,9 +96,7 @@ Capitalize the first character of the argument. ...@@ -96,9 +96,7 @@ Capitalize the first character of the argument.
Split the argument into words using \code{split}, capitalize each word Split the argument into words using \code{split}, capitalize each word
using \code{capitalize}, and join the capitalized words using using \code{capitalize}, and join the capitalized words using
\code{join}. Note that this replaces runs of whitespace characters by \code{join}. Note that this replaces runs of whitespace characters by
a single space. (See also \code{regsub.capwords()} for a version a single space, and removes leading and trailing whitespace.
that doesn't change the delimiters, and lets you specify a word
separator.)
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{expandtabs}{s\, tabsize} \begin{funcdesc}{expandtabs}{s\, tabsize}
...@@ -161,8 +159,6 @@ string. The optional third argument \var{maxsplit} defaults to 0. If ...@@ -161,8 +159,6 @@ string. The optional third argument \var{maxsplit} defaults to 0. If
it is nonzero, at most \var{maxsplit} number of splits occur, and the it is nonzero, at most \var{maxsplit} number of splits occur, and the
remainder of the string is returned as the final element of the list remainder of the string is returned as the final element of the list
(thus, the list will have at most \code{\var{maxsplit}+1} elements). (thus, the list will have at most \code{\var{maxsplit}+1} elements).
(See also \code{regsub.split()} for a version that allows specifying a
regular expression as the separator.)
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{splitfields}{s\optional{\, sep\optional{\, maxsplit}}} \begin{funcdesc}{splitfields}{s\optional{\, sep\optional{\, maxsplit}}}
......
...@@ -96,9 +96,7 @@ Capitalize the first character of the argument. ...@@ -96,9 +96,7 @@ Capitalize the first character of the argument.
Split the argument into words using \code{split}, capitalize each word Split the argument into words using \code{split}, capitalize each word
using \code{capitalize}, and join the capitalized words using using \code{capitalize}, and join the capitalized words using
\code{join}. Note that this replaces runs of whitespace characters by \code{join}. Note that this replaces runs of whitespace characters by
a single space. (See also \code{regsub.capwords()} for a version a single space, and removes leading and trailing whitespace.
that doesn't change the delimiters, and lets you specify a word
separator.)
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{expandtabs}{s\, tabsize} \begin{funcdesc}{expandtabs}{s\, tabsize}
...@@ -161,8 +159,6 @@ string. The optional third argument \var{maxsplit} defaults to 0. If ...@@ -161,8 +159,6 @@ string. The optional third argument \var{maxsplit} defaults to 0. If
it is nonzero, at most \var{maxsplit} number of splits occur, and the it is nonzero, at most \var{maxsplit} number of splits occur, and the
remainder of the string is returned as the final element of the list remainder of the string is returned as the final element of the list
(thus, the list will have at most \code{\var{maxsplit}+1} elements). (thus, the list will have at most \code{\var{maxsplit}+1} elements).
(See also \code{regsub.split()} for a version that allows specifying a
regular expression as the separator.)
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{splitfields}{s\optional{\, sep\optional{\, maxsplit}}} \begin{funcdesc}{splitfields}{s\optional{\, sep\optional{\, maxsplit}}}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment