summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-08-09 08:47:15 +0000
committerSenthil Kumaran <orsenthil@gmail.com>2010-08-09 08:47:15 +0000
commitc0548c9d901fbf60f4e21056f1ecfa81149d923a (patch)
treee4bd6bd0331a6feda21d8aa34fffadc776e05115
parentd74ca12fddc8d57295d62bb84cc491992e5f8b26 (diff)
downloadcpython-git-c0548c9d901fbf60f4e21056f1ecfa81149d923a.tar.gz
Fix Issue5416 - explain negative value of maxplit in str.replace.
-rw-r--r--Lib/string.py3
1 files changed, 2 insertions, 1 deletions
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)