]> granicus.if.org Git - python/commitdiff
Avoid confusing name for the 3rd argument to str.replace().
authorFred Drake <fdrake@acm.org>
Wed, 22 Oct 2003 02:56:40 +0000 (02:56 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 22 Oct 2003 02:56:40 +0000 (02:56 +0000)
This closes SF bug #827260.

Doc/lib/libstdtypes.tex
Objects/stringobject.c

index d19926db3956ce130236420cf1610648bf1f0a07..bffcea94773e9dbe7b590b0b88f7b0bff61fc665 100644 (file)
@@ -563,7 +563,7 @@ Decodes the string using the codec registered for \var{encoding}.
 may be given to set a different error handling scheme.  The default is
 \code{'strict'}, meaning that encoding errors raise
 \exception{ValueError}.  Other possible values are \code{'ignore'} and
-\code{replace'}.
+\code{'replace'}.
 \versionadded{2.2}
 \end{methoddesc}
 
@@ -664,10 +664,10 @@ the string this method is called on.
 \versionchanged[Support for the \var{chars} argument]{2.2.2}
 \end{methoddesc}
 
-\begin{methoddesc}[string]{replace}{old, new\optional{, maxsplit}}
+\begin{methoddesc}[string]{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{maxsplit} is given, only the first \var{maxsplit} occurrences are
+\var{count} is given, only the first \var{count} occurrences are
 replaced.
 \end{methoddesc}
 
index 7143a81596390f0f83cc39297b42adfc4c0a90eb..0a224406710251e02e4439ec32aa1e93e8143826 100644 (file)
@@ -2308,11 +2308,11 @@ mymemreplace(const char *str, int len,          /* input string */
 
 
 PyDoc_STRVAR(replace__doc__,
-"S.replace (old, new[, maxsplit]) -> string\n\
+"S.replace (old, new[, count]) -> string\n\
 \n\
 Return a copy of string S with all occurrences of substring\n\
-old replaced by new.  If the optional argument maxsplit is\n\
-given, only the first maxsplit occurrences are replaced.");
+old replaced by new.  If the optional argument count is\n\
+given, only the first count occurrences are replaced.");
 
 static PyObject *
 string_replace(PyStringObject *self, PyObject *args)