Merge pull request #27311 from jfindlay/maxoc

discuss replacement occurrences in file doc
This commit is contained in:
Justin Findlay 2015-09-22 16:23:10 -06:00
commit b5fe944875
2 changed files with 6 additions and 2 deletions

View file

@ -1302,7 +1302,9 @@ def replace(path,
repl
The replacement text
count
Maximum number of pattern occurrences to be replaced
Maximum number of pattern occurrences to be replaced. Defaults to 0.
If count is a positive integer n, only n occurrences will be replaced,
otherwise all occurrences will be replaced.
flags (list or int)
A list of flags defined in the :ref:`re module documentation
<contents-of-module-re>`. Each list item should be a string that will

View file

@ -2449,7 +2449,9 @@ def replace(name,
The replacement text.
count
Maximum number of pattern occurrences to be replaced.
Maximum number of pattern occurrences to be replaced. Defaults to 0.
If count is a positive integer n, no more than n occurrences will be
replaced, otherwise all occurrences will be replaced.
flags
A list of flags defined in the :ref:`re module documentation <contents-of-module-re>`.