Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libstdtypes.tex @ 38697:1cafbcd7f55c legacy-trunk
RFE #1491485: str/unicode.endswith()/startswith() now accept a tuple as first argument.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Fri, 09 Jun 2006 18:45:48 +0000 |
| parents | 78771d673b4b |
| children | 15fe9dbc5d39 |
line wrap: on
line diff
--- a/Doc/lib/libstdtypes.tex Fri Jun 09 18:40:46 2006 +0000 +++ b/Doc/lib/libstdtypes.tex Fri Jun 09 18:45:48 2006 +0000 @@ -618,8 +618,11 @@ \begin{methoddesc}[string]{endswith}{suffix\optional{, start\optional{, end}}} Return \code{True} if the string ends with the specified \var{suffix}, -otherwise return \code{False}. With optional \var{start}, test beginning at +otherwise return \code{False}. \var{suffix} can also be a tuple of +suffixes to look for. With optional \var{start}, test beginning at that position. With optional \var{end}, stop comparing at that position. + +\versionchanged[Accept tuples as \var{suffix}]{2.5} \end{methoddesc} \begin{methoddesc}[string]{expandtabs}{\optional{tabsize}} @@ -829,9 +832,12 @@ \begin{methoddesc}[string]{startswith}{prefix\optional{, start\optional{, end}}} Return \code{True} if string starts with the \var{prefix}, otherwise -return \code{False}. With optional \var{start}, test string beginning at +return \code{False}. \var{prefix} can also be a tuple of +suffixes to look for. With optional \var{start}, test string beginning at that position. With optional \var{end}, stop comparing string at that position. + +\versionchanged[Accept tuples as \var{prefix}]{2.5} \end{methoddesc} \begin{methoddesc}[string]{strip}{\optional{chars}}
