]> granicus.if.org Git - python/commitdiff
Fix Issue5416 - explain negative value of maxplit in str.replace.
authorSenthil Kumaran <orsenthil@gmail.com>
Mon, 9 Aug 2010 08:47:15 +0000 (08:47 +0000)
committerSenthil Kumaran <orsenthil@gmail.com>
Mon, 9 Aug 2010 08:47:15 +0000 (08:47 +0000)
Lib/string.py

index 6faa1f02c81e1024200a7a2941d15b729ea2e261..9477268340d87498396d5eab84d2cf4029346c0e 100644 (file)
@@ -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)