Skip to content

Commit 816dea7

Browse files
Revert changes for signatures with start/end indices.
1 parent 61754a3 commit 816dea7

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

Doc/library/stdtypes.rst

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,7 +1807,7 @@ expression support in the :mod:`re` module).
18071807
'Python'
18081808

18091809

1810-
.. method:: str.count(sub, start=0, end=None, /)
1810+
.. method:: str.count(sub[, start[, end]])
18111811

18121812
Return the number of non-overlapping occurrences of substring *sub* in the
18131813
range [*start*, *end*]. Optional arguments *start* and *end* are
@@ -1862,7 +1862,7 @@ expression support in the :mod:`re` module).
18621862
in :ref:`debug mode <debug-build>`.
18631863

18641864

1865-
.. method:: str.endswith(suffix, start=0, end=None, /)
1865+
.. method:: str.endswith(suffix[, start[, end]])
18661866

18671867
Return ``True`` if the string ends with the specified *suffix*, otherwise return
18681868
``False``. *suffix* can also be a tuple of suffixes to look for. With optional
@@ -1906,7 +1906,7 @@ expression support in the :mod:`re` module).
19061906
0123 01234
19071907

19081908

1909-
.. method:: str.find(sub, start=0, end=None, /)
1909+
.. method:: str.find(sub[, start[, end]])
19101910

19111911
Return the lowest index in the string where substring *sub* is found within
19121912
the slice ``s[start:end]``. Optional arguments *start* and *end* are
@@ -1969,7 +1969,7 @@ expression support in the :mod:`re` module).
19691969
.. versionadded:: 3.2
19701970

19711971

1972-
.. method:: str.index(sub, start=0, end=None, /)
1972+
.. method:: str.index(sub[, start[, end]])
19731973

19741974
Like :meth:`~str.find`, but raise :exc:`ValueError` when the substring is
19751975
not found.
@@ -2219,14 +2219,14 @@ expression support in the :mod:`re` module).
22192219
*count* is now supported as a keyword argument.
22202220

22212221

2222-
.. method:: str.rfind(sub, start=0, end=None, /)
2222+
.. method:: str.rfind(sub[, start[, end]])
22232223

22242224
Return the highest index in the string where substring *sub* is found, such
22252225
that *sub* is contained within ``s[start:end]``. Optional arguments *start*
22262226
and *end* are interpreted as in slice notation. Return ``-1`` on failure.
22272227

22282228

2229-
.. method:: str.rindex(sub, start=0, end=None, /)
2229+
.. method:: str.rindex(sub[, start[, end]])
22302230

22312231
Like :meth:`rfind` but raises :exc:`ValueError` when the substring *sub* is not
22322232
found.
@@ -2397,7 +2397,7 @@ expression support in the :mod:`re` module).
23972397
['Two lines', '']
23982398

23992399

2400-
.. method:: str.startswith(prefix, start=0, end=None, /)
2400+
.. method:: str.startswith(prefix[, start[, end]])
24012401

24022402
Return ``True`` if string starts with the *prefix*, otherwise return ``False``.
24032403
*prefix* can also be a tuple of prefixes to look for. With optional *start*,
@@ -3143,8 +3143,8 @@ binary data. These restrictions are covered below.
31433143
The following methods on bytes and bytearray objects can be used with
31443144
arbitrary binary data.
31453145

3146-
.. method:: bytes.count(sub, start=0, end=None, /)
3147-
bytearray.count(sub, start=0, end=None, /)
3146+
.. method:: bytes.count(sub[, start[, end]])
3147+
bytearray.count(sub[, start[, end]])
31483148

31493149
Return the number of non-overlapping occurrences of subsequence *sub* in
31503150
the range [*start*, *end*]. Optional arguments *start* and *end* are
@@ -3236,8 +3236,8 @@ arbitrary binary data.
32363236
in :ref:`debug mode <debug-build>`.
32373237

32383238

3239-
.. method:: bytes.endswith(suffix, start=0, end=None, /)
3240-
bytearray.endswith(suffix, start=0, end=None, /)
3239+
.. method:: bytes.endswith(suffix[, start[, end]])
3240+
bytearray.endswith(suffix[, start[, end]])
32413241

32423242
Return ``True`` if the binary data ends with the specified *suffix*,
32433243
otherwise return ``False``. *suffix* can also be a tuple of suffixes to
@@ -3247,8 +3247,8 @@ arbitrary binary data.
32473247
The suffix(es) to search for may be any :term:`bytes-like object`.
32483248

32493249

3250-
.. method:: bytes.find(sub, start=0, end=None, /)
3251-
bytearray.find(sub, start=0, end=None, /)
3250+
.. method:: bytes.find(sub[, start[, end]])
3251+
bytearray.find(sub[, start[, end]])
32523252

32533253
Return the lowest index in the data where the subsequence *sub* is found,
32543254
such that *sub* is contained in the slice ``s[start:end]``. Optional
@@ -3271,8 +3271,8 @@ arbitrary binary data.
32713271
Also accept an integer in the range 0 to 255 as the subsequence.
32723272

32733273

3274-
.. method:: bytes.index(sub, start=0, end=None, /)
3275-
bytearray.index(sub, start=0, end=None, /)
3274+
.. method:: bytes.index(sub[, start[, end]])
3275+
bytearray.index(sub[, start[, end]])
32763276

32773277
Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the
32783278
subsequence is not found.
@@ -3335,8 +3335,8 @@ arbitrary binary data.
33353335
always produces a new object, even if no changes were made.
33363336

33373337

3338-
.. method:: bytes.rfind(sub, start=0, end=None, /)
3339-
bytearray.rfind(sub, start=0, end=None, /)
3338+
.. method:: bytes.rfind(sub[, start[, end]])
3339+
bytearray.rfind(sub[, start[, end]])
33403340

33413341
Return the highest index in the sequence where the subsequence *sub* is
33423342
found, such that *sub* is contained within ``s[start:end]``. Optional
@@ -3350,8 +3350,8 @@ arbitrary binary data.
33503350
Also accept an integer in the range 0 to 255 as the subsequence.
33513351

33523352

3353-
.. method:: bytes.rindex(sub, start=0, end=None, /)
3354-
bytearray.rindex(sub, start=0, end=None, /)
3353+
.. method:: bytes.rindex(sub[, start[, end]])
3354+
bytearray.rindex(sub[, start[, end]])
33553355

33563356
Like :meth:`~bytes.rfind` but raises :exc:`ValueError` when the
33573357
subsequence *sub* is not found.
@@ -3376,8 +3376,8 @@ arbitrary binary data.
33763376
The separator to search for may be any :term:`bytes-like object`.
33773377

33783378

3379-
.. method:: bytes.startswith(prefix, start=0, end=None, /)
3380-
bytearray.startswith(prefix, start=0, end=None, /)
3379+
.. method:: bytes.startswith(prefix[, start[, end]])
3380+
bytearray.startswith(prefix[, start[, end]])
33813381

33823382
Return ``True`` if the binary data starts with the specified *prefix*,
33833383
otherwise return ``False``. *prefix* can also be a tuple of prefixes to

0 commit comments

Comments
 (0)