From 9ac20231e02512bd42d3dfc7e0d13dde28a4a96b Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Fri, 28 Sep 2012 16:31:06 +0300 Subject: [PATCH] Update documentation for string.replace. Thanks to docs@ --- Doc/library/string.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/string.rst b/Doc/library/string.rst index ef1a0c265bc..a7336c477c0 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -1029,9 +1029,9 @@ not be removed until Python 3. The functions defined in this module are: reached. Strings starting with a sign are handled correctly. -.. function:: replace(str, old, new[, maxreplace]) +.. function:: replace(s, old, new[, maxreplace]) - Return a copy of string *str* with all occurrences of substring *old* replaced + Return a copy of string *s* with all occurrences of substring *old* replaced by *new*. If the optional argument *maxreplace* is given, the first *maxreplace* occurrences are replaced.