From c0548c9d901fbf60f4e21056f1ecfa81149d923a Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Mon, 9 Aug 2010 08:47:15 +0000 Subject: Fix Issue5416 - explain negative value of maxplit in str.replace. --- Lib/string.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/string.py b/Lib/string.py index 6faa1f0..9477268 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) -- cgit v0.12