[Python-checkins] r54655 - python/trunk/Doc/lib/libstdtypes.tex

georg.brandl python-checkins at python.org
Mon Apr 2 01:31:33 CEST 2007


Author: georg.brandl
Date: Mon Apr  2 01:31:30 2007
New Revision: 54655

Modified:
   python/trunk/Doc/lib/libstdtypes.tex
Log:
Fix the class name of strings.


Modified: python/trunk/Doc/lib/libstdtypes.tex
==============================================================================
--- python/trunk/Doc/lib/libstdtypes.tex	(original)
+++ python/trunk/Doc/lib/libstdtypes.tex	Mon Apr  2 01:31:30 2007
@@ -572,25 +572,25 @@
 These are the string methods which both 8-bit strings and Unicode
 objects support:
 
-\begin{methoddesc}[string]{capitalize}{}
+\begin{methoddesc}[str]{capitalize}{}
 Return a copy of the string with only its first character capitalized.
 
 For 8-bit strings, this method is locale-dependent.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{center}{width\optional{, fillchar}}
+\begin{methoddesc}[str]{center}{width\optional{, fillchar}}
 Return centered in a string of length \var{width}. Padding is done
 using the specified \var{fillchar} (default is a space).
 \versionchanged[Support for the \var{fillchar} argument]{2.4}
 \end{methoddesc}
 
-\begin{methoddesc}[string]{count}{sub\optional{, start\optional{, end}}}
+\begin{methoddesc}[str]{count}{sub\optional{, start\optional{, end}}}
 Return the number of occurrences of substring \var{sub} in string
 S\code{[\var{start}:\var{end}]}.  Optional arguments \var{start} and
 \var{end} are interpreted as in slice notation.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{decode}{\optional{encoding\optional{, errors}}}
+\begin{methoddesc}[str]{decode}{\optional{encoding\optional{, errors}}}
 Decodes the string using the codec registered for \var{encoding}.
 \var{encoding} defaults to the default string encoding.  \var{errors}
 may be given to set a different error handling scheme.  The default is
@@ -602,7 +602,7 @@
 \versionchanged[Support for other error handling schemes added]{2.3}
 \end{methoddesc}
 
-\begin{methoddesc}[string]{encode}{\optional{encoding\optional{,errors}}}
+\begin{methoddesc}[str]{encode}{\optional{encoding\optional{,errors}}}
 Return an encoded version of the string.  Default encoding is the current
 default string encoding.  \var{errors} may be given to set a different
 error handling scheme.  The default for \var{errors} is
@@ -617,7 +617,7 @@
 \code{'backslashreplace'} and other error handling schemes added]{2.3}
 \end{methoddesc}
 
-\begin{methoddesc}[string]{endswith}{suffix\optional{, start\optional{, end}}}
+\begin{methoddesc}[str]{endswith}{suffix\optional{, start\optional{, end}}}
 Return \code{True} if the string ends with the specified \var{suffix},
 otherwise return \code{False}.  \var{suffix} can also be a tuple of
 suffixes to look for.  With optional \var{start}, test beginning at
@@ -626,13 +626,13 @@
 \versionchanged[Accept tuples as \var{suffix}]{2.5}
 \end{methoddesc}
 
-\begin{methoddesc}[string]{expandtabs}{\optional{tabsize}}
+\begin{methoddesc}[str]{expandtabs}{\optional{tabsize}}
 Return a copy of the string where all tab characters are expanded
 using spaces.  If \var{tabsize} is not given, a tab size of \code{8}
 characters is assumed.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{find}{sub\optional{, start\optional{, end}}}
+\begin{methoddesc}[str]{find}{sub\optional{, start\optional{, end}}}
 Return the lowest index in the string where substring \var{sub} is
 found, such that \var{sub} is contained in the range [\var{start},
 \var{end}].  Optional arguments \var{start} and \var{end} are
@@ -640,47 +640,47 @@
 not found.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{index}{sub\optional{, start\optional{, end}}}
+\begin{methoddesc}[str]{index}{sub\optional{, start\optional{, end}}}
 Like \method{find()}, but raise \exception{ValueError} when the
 substring is not found.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{isalnum}{}
+\begin{methoddesc}[str]{isalnum}{}
 Return true if all characters in the string are alphanumeric and there
 is at least one character, false otherwise.
 
 For 8-bit strings, this method is locale-dependent.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{isalpha}{}
+\begin{methoddesc}[str]{isalpha}{}
 Return true if all characters in the string are alphabetic and there
 is at least one character, false otherwise.
 
 For 8-bit strings, this method is locale-dependent.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{isdigit}{}
+\begin{methoddesc}[str]{isdigit}{}
 Return true if all characters in the string are digits and there
 is at least one character, false otherwise.
 
 For 8-bit strings, this method is locale-dependent.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{islower}{}
+\begin{methoddesc}[str]{islower}{}
 Return true if all cased characters in the string are lowercase and
 there is at least one cased character, false otherwise.
 
 For 8-bit strings, this method is locale-dependent.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{isspace}{}
+\begin{methoddesc}[str]{isspace}{}
 Return true if there are only whitespace characters in the string and
 there is at least one character, false otherwise.
 
 For 8-bit strings, this method is locale-dependent.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{istitle}{}
+\begin{methoddesc}[str]{istitle}{}
 Return true if the string is a titlecased string and there is at least one
 character, for example uppercase characters may only follow uncased
 characters and lowercase characters only cased ones.  Return false
@@ -689,20 +689,20 @@
 For 8-bit strings, this method is locale-dependent.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{isupper}{}
+\begin{methoddesc}[str]{isupper}{}
 Return true if all cased characters in the string are uppercase and
 there is at least one cased character, false otherwise.
 
 For 8-bit strings, this method is locale-dependent.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{join}{seq}
+\begin{methoddesc}[str]{join}{seq}
 Return a string which is the concatenation of the strings in the
 sequence \var{seq}.  The separator between elements is the string
 providing this method.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{ljust}{width\optional{, fillchar}}
+\begin{methoddesc}[str]{ljust}{width\optional{, fillchar}}
 Return the string left justified in a string of length \var{width}.
 Padding is done using the specified \var{fillchar} (default is a
 space).  The original string is returned if
@@ -710,13 +710,13 @@
 \versionchanged[Support for the \var{fillchar} argument]{2.4}
 \end{methoddesc}
 
-\begin{methoddesc}[string]{lower}{}
+\begin{methoddesc}[str]{lower}{}
 Return a copy of the string converted to lowercase.
 
 For 8-bit strings, this method is locale-dependent.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{lstrip}{\optional{chars}}
+\begin{methoddesc}[str]{lstrip}{\optional{chars}}
 Return a copy of the string with leading characters removed.  The
 \var{chars} argument is a string specifying the set of characters
 to be removed.  If omitted or \code{None}, the \var{chars} argument
@@ -731,7 +731,7 @@
 \versionchanged[Support for the \var{chars} argument]{2.2.2}
 \end{methoddesc}
 
-\begin{methoddesc}[string]{partition}{sep}
+\begin{methoddesc}[str]{partition}{sep}
 Split the string at the first occurrence of \var{sep}, and return
 a 3-tuple containing the part before the separator, the separator
 itself, and the part after the separator.  If the separator is not
@@ -740,26 +740,26 @@
 \versionadded{2.5}
 \end{methoddesc}
 
-\begin{methoddesc}[string]{replace}{old, new\optional{, count}}
+\begin{methoddesc}[str]{replace}{old, new\optional{, count}}
 Return a copy of the string with all occurrences of substring
 \var{old} replaced by \var{new}.  If the optional argument
 \var{count} is given, only the first \var{count} occurrences are
 replaced.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{rfind}{sub \optional{,start \optional{,end}}}
+\begin{methoddesc}[str]{rfind}{sub \optional{,start \optional{,end}}}
 Return the highest index in the string where substring \var{sub} is
 found, such that \var{sub} is contained within s[start,end].  Optional
 arguments \var{start} and \var{end} are interpreted as in slice
 notation.  Return \code{-1} on failure.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{rindex}{sub\optional{, start\optional{, end}}}
+\begin{methoddesc}[str]{rindex}{sub\optional{, start\optional{, end}}}
 Like \method{rfind()} but raises \exception{ValueError} when the
 substring \var{sub} is not found.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{rjust}{width\optional{, fillchar}}
+\begin{methoddesc}[str]{rjust}{width\optional{, fillchar}}
 Return the string right justified in a string of length \var{width}.
 Padding is done using the specified \var{fillchar} (default is a space).
 The original string is returned if
@@ -767,7 +767,7 @@
 \versionchanged[Support for the \var{fillchar} argument]{2.4}
 \end{methoddesc}
 
-\begin{methoddesc}[string]{rpartition}{sep}
+\begin{methoddesc}[str]{rpartition}{sep}
 Split the string at the last occurrence of \var{sep}, and return
 a 3-tuple containing the part before the separator, the separator
 itself, and the part after the separator.  If the separator is not
@@ -776,7 +776,7 @@
 \versionadded{2.5}
 \end{methoddesc}
 
-\begin{methoddesc}[string]{rsplit}{\optional{sep \optional{,maxsplit}}}
+\begin{methoddesc}[str]{rsplit}{\optional{sep \optional{,maxsplit}}}
 Return a list of the words in the string, using \var{sep} as the
 delimiter string.  If \var{maxsplit} is given, at most \var{maxsplit}
 splits are done, the \emph{rightmost} ones.  If \var{sep} is not specified
@@ -786,7 +786,7 @@
 \versionadded{2.4}
 \end{methoddesc}
 
-\begin{methoddesc}[string]{rstrip}{\optional{chars}}
+\begin{methoddesc}[str]{rstrip}{\optional{chars}}
 Return a copy of the string with trailing characters removed.  The
 \var{chars} argument is a string specifying the set of characters
 to be removed.  If omitted or \code{None}, the \var{chars} argument
@@ -801,7 +801,7 @@
 \versionchanged[Support for the \var{chars} argument]{2.2.2}
 \end{methoddesc}
 
-\begin{methoddesc}[string]{split}{\optional{sep \optional{,maxsplit}}}
+\begin{methoddesc}[str]{split}{\optional{sep \optional{,maxsplit}}}
 Return a list of the words in the string, using \var{sep} as the
 delimiter string.  If \var{maxsplit} is given, at most \var{maxsplit}
 splits are done. (thus, the list will have at most \code{\var{maxsplit}+1}
@@ -824,13 +824,13 @@
 returns an empty list.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{splitlines}{\optional{keepends}}
+\begin{methoddesc}[str]{splitlines}{\optional{keepends}}
 Return a list of the lines in the string, breaking at line
 boundaries.  Line breaks are not included in the resulting list unless
 \var{keepends} is given and true.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{startswith}{prefix\optional{,
+\begin{methoddesc}[str]{startswith}{prefix\optional{,
                                        start\optional{, end}}}
 Return \code{True} if string starts with the \var{prefix}, otherwise
 return \code{False}.  \var{prefix} can also be a tuple of
@@ -841,7 +841,7 @@
 \versionchanged[Accept tuples as \var{prefix}]{2.5}
 \end{methoddesc}
 
-\begin{methoddesc}[string]{strip}{\optional{chars}}
+\begin{methoddesc}[str]{strip}{\optional{chars}}
 Return a copy of the string with the leading and trailing characters
 removed.  The \var{chars} argument is a string specifying the set of
 characters to be removed.  If omitted or \code{None}, the \var{chars}
@@ -856,21 +856,21 @@
 \versionchanged[Support for the \var{chars} argument]{2.2.2}
 \end{methoddesc}
 
-\begin{methoddesc}[string]{swapcase}{}
+\begin{methoddesc}[str]{swapcase}{}
 Return a copy of the string with uppercase characters converted to
 lowercase and vice versa.
 
 For 8-bit strings, this method is locale-dependent.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{title}{}
+\begin{methoddesc}[str]{title}{}
 Return a titlecased version of the string: words start with uppercase
 characters, all remaining cased characters are lowercase.
 
 For 8-bit strings, this method is locale-dependent.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{translate}{table\optional{, deletechars}}
+\begin{methoddesc}[str]{translate}{table\optional{, deletechars}}
 Return a copy of the string where all characters occurring in the
 optional argument \var{deletechars} are removed, and the remaining
 characters have been mapped through the given translation table, which
@@ -890,13 +890,13 @@
 \module{encodings.cp1251} for an example).      
 \end{methoddesc}
 
-\begin{methoddesc}[string]{upper}{}
+\begin{methoddesc}[str]{upper}{}
 Return a copy of the string converted to uppercase.
 
 For 8-bit strings, this method is locale-dependent.
 \end{methoddesc}
 
-\begin{methoddesc}[string]{zfill}{width}
+\begin{methoddesc}[str]{zfill}{width}
 Return the numeric string left filled with zeros in a string
 of length \var{width}. The original string is returned if
 \var{width} is less than \code{len(\var{s})}.


More information about the Python-checkins mailing list