Patch #976880: add mmap .rfind() method, and 'end' paramter to .find().
Contributed by John Lenton.
diff --git a/Doc/library/mmap.rst b/Doc/library/mmap.rst
index 070ce4f..cdc761c 100644
--- a/Doc/library/mmap.rst
+++ b/Doc/library/mmap.rst
@@ -139,11 +139,12 @@
an exception being raised.
-.. method:: mmap.find(string[, start])
+.. method:: mmap.find(string[, start[, end]])
- Returns the lowest index in the object where the substring *string* is found.
- Returns ``-1`` on failure. *start* is the index at which the search begins, and
- defaults to zero.
+ Returns the lowest index in the object where the substring *string* is found,
+ such that *string* is contained in the range [*start*, *end*]. Optional
+ arguments *start* and *end* are interpreted as in slice notation.
+ Returns ``-1`` on failure.
.. method:: mmap.flush([offset, size])
@@ -188,6 +189,14 @@
:exc:`TypeError` exception.
+.. method:: mmap.rfind(string[, start[, end]])
+
+ Returns the highest index in the object where the substring *string* is
+ found, such that *string* is contained in the range [*start*,
+ *end*]. Optional arguments *start* and *end* are interpreted as in slice
+ notation. Returns ``-1`` on failure.
+
+
.. method:: mmap.seek(pos[, whence])
Set the file's current position. *whence* argument is optional and defaults to