diff options
| author | Walter Dörwald <walter@livinglogic.de> | 2002-04-22 17:42:37 +0000 | 
|---|---|---|
| committer | Walter Dörwald <walter@livinglogic.de> | 2002-04-22 17:42:37 +0000 | 
| commit | de02bcb2659af6acb1d44ba61c0bcf7b2d53a6ed (patch) | |
| tree | bcb24d906dccf9dfd69b2f1eb69c911d68cdba45 /Doc/lib/libstring.tex | |
| parent | a7cc43b9e8b55223ad6b711488fbe8c10df6b5c2 (diff) | |
| download | cpython-git-de02bcb2659af6acb1d44ba61c0bcf7b2d53a6ed.tar.gz | |
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.
Diffstat (limited to 'Doc/lib/libstring.tex')
| -rw-r--r-- | Doc/lib/libstring.tex | 25 | 
1 files changed, 18 insertions, 7 deletions
diff --git a/Doc/lib/libstring.tex b/Doc/lib/libstring.tex index 5f71ec8102..b369901016 100644 --- a/Doc/lib/libstring.tex +++ b/Doc/lib/libstring.tex @@ -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}  | 
