diff options
author | Georg Brandl <georg@python.org> | 2006-06-09 18:45:48 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-06-09 18:45:48 (GMT) |
commit | 242508160eb6520cca0f7a831449987f3ea1fba0 (patch) | |
tree | 0f75dd6fcef4bf7627c07df3fd21eeb746cdc271 /Doc | |
parent | 932f5afbe8567047c74496662170c0e370416ec3 (diff) | |
download | cpython-242508160eb6520cca0f7a831449987f3ea1fba0.zip cpython-242508160eb6520cca0f7a831449987f3ea1fba0.tar.gz cpython-242508160eb6520cca0f7a831449987f3ea1fba0.tar.bz2 |
RFE #1491485: str/unicode.endswith()/startswith() now accept a tuple as first argument.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libstdtypes.tex | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Doc/lib/libstdtypes.tex b/Doc/lib/libstdtypes.tex index 576a5ad..1fe2f60 100644 --- a/Doc/lib/libstdtypes.tex +++ b/Doc/lib/libstdtypes.tex @@ -618,8 +618,11 @@ For a list of possible encodings, see section~\ref{standard-encodings}. \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 @@ boundaries. Line breaks are not included in the resulting list unless \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}} |