From: Senthil Kumaran Date: Mon, 9 Aug 2010 08:47:15 +0000 (+0000) Subject: Fix Issue5416 - explain negative value of maxplit in str.replace. X-Git-Tag: v2.7.1rc1~435 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c0548c9d901fbf60f4e21056f1ecfa81149d923a;p=python Fix Issue5416 - explain negative value of maxplit in str.replace. --- diff --git a/Lib/string.py b/Lib/string.py index 6faa1f02c8..9477268340 100644 --- a/Lib/string.py +++ b/Lib/string.py @@ -513,7 +513,8 @@ def replace(s, old, new, maxsplit=-1): Return a copy of string str with all occurrences of substring old replaced by new. If the optional argument maxsplit is - given, only the first maxsplit occurrences are replaced. + given, only the first maxsplit occurrences are replaced. A + negative value of maxsplit signifies all occurances. """ return s.replace(old, new, maxsplit)