mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Apply patch diff.txt from SF feature request
http://www.python.org/sf/444708 This adds the optional argument for str.strip to unicode.strip too and makes it possible to call str.strip with a unicode argument and unicode.strip with a str argument.
This commit is contained in:
parent
a7cc43b9e8
commit
de02bcb265
6 changed files with 243 additions and 80 deletions
|
@ -235,17 +235,28 @@ The functions defined in this module are:
|
|||
\function{joinfields()} was only used with two arguments.)
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{lstrip}{s}
|
||||
Return a copy of \var{s} but without leading whitespace characters.
|
||||
\begin{funcdesc}{lstrip}{s\optional{, chars}}
|
||||
Return a copy of the string with leading characters removed. If
|
||||
\var{chars} is omitted or \code{None}, whitespace characters are
|
||||
removed. If given and not \code{None}, \var{chars} must be a string;
|
||||
the characters in the string will be stripped from the beginning of
|
||||
the string this method is called on.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{rstrip}{s}
|
||||
Return a copy of \var{s} but without trailing whitespace
|
||||
characters.
|
||||
\begin{funcdesc}{rstrip}{s\optional{, chars}}
|
||||
Return a copy of the string with trailing characters removed. If
|
||||
\var{chars} is omitted or \code{None}, whitespace characters are
|
||||
removed. If given and not \code{None}, \var{chars} must be a string;
|
||||
the characters in the string will be stripped from the end of the
|
||||
string this method is called on.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{strip}{s}
|
||||
Return a copy of \var{s} without leading or trailing whitespace.
|
||||
\begin{funcdesc}{strip}{s\optional{, chars}}
|
||||
Return a copy of the string with leading and trailing characters
|
||||
removed. If \var{chars} is omitted or \code{None}, whitespace
|
||||
characters are removed. If given and not \code{None}, \var{chars}
|
||||
must be a string; the characters in the string will be stripped from
|
||||
the both ends of the string this method is called on.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{swapcase}{s}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue