@@ -1897,8 +1897,7 @@ expression support in the :mod:`re` module).
18971897 'Python'
18981898
18991899
1900- .. method :: str.count(sub, /)
1901- str.count(sub, start=0, end=sys.maxsize, /)
1900+ .. method :: str.count(sub, start=0, end=sys.maxsize, /)
19021901
19031902 Return the number of non-overlapping occurrences of substring *sub * in the
19041903 range [*start *, *end *]. Optional arguments *start * and *end * are
@@ -1997,8 +1996,7 @@ expression support in the :mod:`re` module).
19971996 0123 01234
19981997
19991998
2000- .. method :: str.find(sub, /)
2001- str.find(sub, start=0, end=sys.maxsize, /)
1999+ .. method :: str.find(sub, start=0, end=sys.maxsize, /)
20022000
20032001 Return the lowest index in the string where substring *sub * is found within
20042002 the slice ``s[start:end] ``. Optional arguments *start * and *end * are
@@ -2075,7 +2073,7 @@ expression support in the :mod:`re` module).
20752073 .. versionadded :: 3.2
20762074
20772075
2078- .. method :: str.index(sub[ , start[ , end]] )
2076+ .. method :: str.index(sub, start=0 , end=sys.maxsize, / )
20792077
20802078 Like :meth: `~str.find `, but raise :exc: `ValueError ` when the substring is
20812079 not found. For example:
@@ -2507,8 +2505,7 @@ expression support in the :mod:`re` module).
25072505 *count * is now supported as a keyword argument.
25082506
25092507
2510- .. method :: str.rfind(sub, /)
2511- str.rfind(sub, start=0, end=sys.maxsize, /)
2508+ .. method :: str.rfind(sub, start=0, end=sys.maxsize, /)
25122509
25132510 Return the highest index in the string where substring *sub * is found, such
25142511 that *sub * is contained within ``s[start:end] ``. Optional arguments *start *
@@ -2525,8 +2522,7 @@ expression support in the :mod:`re` module).
25252522 See also :meth: `find ` and :meth: `rindex `.
25262523
25272524
2528- .. method :: str.rindex(sub, /)
2529- str.rindex(sub, start=0, end=sys.maxsize, /)
2525+ .. method :: str.rindex(sub, start=0, end=sys.maxsize, /)
25302526
25312527 Like :meth: `rfind ` but raises :exc: `ValueError ` when the substring *sub * is not
25322528 found.
@@ -3607,10 +3603,9 @@ binary data. These restrictions are covered below.
36073603The following methods on bytes and bytearray objects can be used with
36083604arbitrary binary data.
36093605
3610- .. method :: bytes.count(sub, /)
3611- bytes.count(sub, start=0, end=sys.maxsize, /)
3612- bytearray.count(sub, /)
3606+ .. method :: bytes.count(sub, start=0, end=sys.maxsize, /)
36133607 bytearray.count(sub, start=0, end=sys.maxsize, /)
3608+
36143609
36153610 Return the number of non-overlapping occurrences of subsequence *sub * in
36163611 the range [*start *, *end *]. Optional arguments *start * and *end * are
@@ -3713,8 +3708,8 @@ arbitrary binary data.
37133708 The suffix(es) to search for may be any :term: `bytes-like object `.
37143709
37153710
3716- .. method :: bytes.find(sub[ , start[ , end]] )
3717- bytearray.find(sub[ , start[ , end]] )
3711+ .. method :: bytes.find(sub, start=0 , end=sys.maxsize, / )
3712+ bytearray.find(sub, start=0 , end=sys.maxsize, / )
37183713
37193714 Return the lowest index in the data where the subsequence *sub * is found,
37203715 such that *sub * is contained in the slice ``s[start:end] ``. Optional
@@ -3737,8 +3732,8 @@ arbitrary binary data.
37373732 Also accept an integer in the range 0 to 255 as the subsequence.
37383733
37393734
3740- .. method :: bytes.index(sub[ , start[ , end]] )
3741- bytearray.index(sub[ , start[ , end]] )
3735+ .. method :: bytes.index(sub, start=0 , end=sys.maxsize, / )
3736+ bytearray.index(sub, start=0 , end=sys.maxsize, / )
37423737
37433738 Like :meth: `~bytes.find `, but raise :exc: `ValueError ` when the
37443739 subsequence is not found.
@@ -3805,8 +3800,8 @@ arbitrary binary data.
38053800 *count * is now supported as a keyword argument.
38063801
38073802
3808- .. method :: bytes.rfind(sub[ , start[ , end]] )
3809- bytearray.rfind(sub[ , start[ , end]] )
3803+ .. method :: bytes.rfind(sub, start=0 , end=sys.maxsize, / )
3804+ bytearray.rfind(sub, start=0 , end=sys.maxsize, / )
38103805
38113806 Return the highest index in the sequence where the subsequence *sub * is
38123807 found, such that *sub * is contained within ``s[start:end] ``. Optional
@@ -3820,8 +3815,8 @@ arbitrary binary data.
38203815 Also accept an integer in the range 0 to 255 as the subsequence.
38213816
38223817
3823- .. method :: bytes.rindex(sub[ , start[ , end]] )
3824- bytearray.rindex(sub[ , start[ , end]] )
3818+ .. method :: bytes.rindex(sub, start=0 , end=sys.maxsize, / )
3819+ bytearray.rindex(sub, start=0 , end=sys.maxsize, / )
38253820
38263821 Like :meth: `~bytes.rfind ` but raises :exc: `ValueError ` when the
38273822 subsequence *sub * is not found.
0 commit comments