]> granicus.if.org Git - python/commitdiff
make slice notation in (r)find docs consistent
authorBenjamin Peterson <benjamin@python.org>
Tue, 27 Apr 2010 22:56:31 +0000 (22:56 +0000)
committerBenjamin Peterson <benjamin@python.org>
Tue, 27 Apr 2010 22:56:31 +0000 (22:56 +0000)
Doc/library/stdtypes.rst

index 0a6178bf941da3ec3faa9e39f7fe3e78a7ceb6a8..600dac0c9f7ac209aad99e8eeb683e087ce18194 100644 (file)
@@ -910,10 +910,10 @@ string functions based on regular expressions.
 
 .. method:: str.find(sub[, start[, end]])
 
-   Return the lowest index in the string where substring *sub* is found, such that
-   *sub* is contained in the range [*start*, *end*].  Optional arguments *start*
-   and *end* are interpreted as in slice notation.  Return ``-1`` if *sub* is not
-   found.
+   Return the lowest index in the string where substring *sub* is found, such
+   that *sub* is contained in the slice ``s[start:end]``.  Optional arguments
+   *start* and *end* are interpreted as in slice notation.  Return ``-1`` if
+   *sub* is not found.
 
 
 .. method:: str.format(*args, **kwargs)
@@ -1059,9 +1059,9 @@ string functions based on regular expressions.
 
 .. method:: str.rfind(sub [,start [,end]])
 
-   Return the highest index in the string where substring *sub* is found, such that
-   *sub* is contained within s[start,end].  Optional arguments *start* and *end*
-   are interpreted as in slice notation.  Return ``-1`` on failure.
+   Return the highest index in the string where substring *sub* is found, such
+   that *sub* is contained within ``s[start:end]``.  Optional arguments *start*
+   and *end* are interpreted as in slice notation.  Return ``-1`` on failure.
 
 
 .. method:: str.rindex(sub[, start[, end]])