diff options
| author | Senthil Kumaran <orsenthil@gmail.com> | 2010-09-08 12:40:45 (GMT) | 
|---|---|---|
| committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-09-08 12:40:45 (GMT) | 
| commit | a240cb1f2d7a85c3f12e95780361a02765a800f0 (patch) | |
| tree | bfa5628c47881a0b91371c9f25e2715f566093f1 /Lib/string.py | |
| parent | 011a82b1c45e08aa70396e5602720ef98eb796de (diff) | |
| download | cpython-a240cb1f2d7a85c3f12e95780361a02765a800f0.zip cpython-a240cb1f2d7a85c3f12e95780361a02765a800f0.tar.gz cpython-a240cb1f2d7a85c3f12e95780361a02765a800f0.tar.bz2  | |
Issue5416 - Revert a documentatin change made to explain replace on negative value.
Minor changes to doc:  s/maxsplit/maxreplace
Diffstat (limited to 'Lib/string.py')
| -rw-r--r-- | Lib/string.py | 11 | 
1 files changed, 5 insertions, 6 deletions
diff --git a/Lib/string.py b/Lib/string.py index 9477268..5e13d15 100644 --- a/Lib/string.py +++ b/Lib/string.py @@ -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,  | 
