]> granicus.if.org Git - python/commitdiff
Issue5416 - Revert a documentatin change made to explain replace on negative value.
authorSenthil Kumaran <orsenthil@gmail.com>
Wed, 8 Sep 2010 12:40:45 +0000 (12:40 +0000)
committerSenthil Kumaran <orsenthil@gmail.com>
Wed, 8 Sep 2010 12:40:45 +0000 (12:40 +0000)
Minor changes to doc:  s/maxsplit/maxreplace

Lib/string.py

index 9477268340d87498396d5eab84d2cf4029346c0e..5e13d15338c63957abceacbe5ac58541444bbb30 100644 (file)
@@ -508,16 +508,15 @@ def capitalize(s):
     return s.capitalize()
 
 # Substring replacement (global)
-def replace(s, old, new, maxsplit=-1):
-    """replace (str, old, new[, maxsplit]) -> string
+def replace(s, old, new, maxreplace=-1):
+    """replace (str, old, new[, maxreplace]) -> string
 
     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. A
-    negative value of maxsplit signifies all occurances.
+    old replaced by new. If the optional argument maxreplace is
+    given, only the first maxreplace occurrences are replaced.
 
     """
-    return s.replace(old, new, maxsplit)
+    return s.replace(old, new, maxreplace)
 
 
 # Try importing optional built-in module "strop" -- if it exists,