@@ -1806,7 +1806,7 @@ expression support in the :mod:`re` module).
1806
1806
'Python'
1807
1807
1808
1808
1809
- .. method :: str.count(sub, start=0, stop =None, /)
1809
+ .. method :: str.count(sub, start=0, end =None, /)
1810
1810
1811
1811
Return the number of non-overlapping occurrences of substring *sub * in the
1812
1812
range [*start *, *end *]. Optional arguments *start * and *end * are
@@ -1861,7 +1861,7 @@ expression support in the :mod:`re` module).
1861
1861
in :ref: `debug mode <debug-build >`.
1862
1862
1863
1863
1864
- .. method :: str.endswith(suffix, start=0, stop =None, /)
1864
+ .. method :: str.endswith(suffix, start=0, end =None, /)
1865
1865
1866
1866
Return ``True `` if the string ends with the specified *suffix *, otherwise return
1867
1867
``False ``. *suffix * can also be a tuple of suffixes to look for. With optional
@@ -1905,7 +1905,7 @@ expression support in the :mod:`re` module).
1905
1905
0123 01234
1906
1906
1907
1907
1908
- .. method :: str.find(sub, start=0, stop =None, /)
1908
+ .. method :: str.find(sub, start=0, end =None, /)
1909
1909
1910
1910
Return the lowest index in the string where substring *sub * is found within
1911
1911
the slice ``s[start:end] ``. Optional arguments *start * and *end * are
@@ -1968,7 +1968,7 @@ expression support in the :mod:`re` module).
1968
1968
.. versionadded :: 3.2
1969
1969
1970
1970
1971
- .. method :: str.index(sub, start=0, stop =None, /)
1971
+ .. method :: str.index(sub, start=0, end =None, /)
1972
1972
1973
1973
Like :meth: `~str.find `, but raise :exc: `ValueError ` when the substring is
1974
1974
not found.
@@ -2217,14 +2217,14 @@ expression support in the :mod:`re` module).
2217
2217
*count * is now supported as a keyword argument.
2218
2218
2219
2219
2220
- .. method :: str.rfind(sub, start=0, stop =None, /)
2220
+ .. method :: str.rfind(sub, start=0, end =None, /)
2221
2221
2222
2222
Return the highest index in the string where substring *sub * is found, such
2223
2223
that *sub * is contained within ``s[start:end] ``. Optional arguments *start *
2224
2224
and *end * are interpreted as in slice notation. Return ``-1 `` on failure.
2225
2225
2226
2226
2227
- .. method :: str.rindex(sub, start=0, stop =None, /)
2227
+ .. method :: str.rindex(sub, start=0, end =None, /)
2228
2228
2229
2229
Like :meth: `rfind ` but raises :exc: `ValueError ` when the substring *sub * is not
2230
2230
found.
@@ -2395,7 +2395,7 @@ expression support in the :mod:`re` module).
2395
2395
['Two lines', '']
2396
2396
2397
2397
2398
- .. method :: str.startswith(prefix, start=0, stop =None, /)
2398
+ .. method :: str.startswith(prefix, start=0, end =None, /)
2399
2399
2400
2400
Return ``True `` if string starts with the *prefix *, otherwise return ``False ``.
2401
2401
*prefix * can also be a tuple of prefixes to look for. With optional *start *,
@@ -3141,8 +3141,8 @@ binary data. These restrictions are covered below.
3141
3141
The following methods on bytes and bytearray objects can be used with
3142
3142
arbitrary binary data.
3143
3143
3144
- .. method :: bytes.count(sub, start=0, stop =None, /)
3145
- bytearray.count(sub, start=0, stop =None, /)
3144
+ .. method :: bytes.count(sub, start=0, end =None, /)
3145
+ bytearray.count(sub, start=0, end =None, /)
3146
3146
3147
3147
Return the number of non-overlapping occurrences of subsequence *sub * in
3148
3148
the range [*start *, *end *]. Optional arguments *start * and *end * are
@@ -3234,8 +3234,8 @@ arbitrary binary data.
3234
3234
in :ref: `debug mode <debug-build >`.
3235
3235
3236
3236
3237
- .. method :: bytes.endswith(suffix, start=0, stop =None, /)
3238
- bytearray.endswith(suffix, start=0, stop =None, /)
3237
+ .. method :: bytes.endswith(suffix, start=0, end =None, /)
3238
+ bytearray.endswith(suffix, start=0, end =None, /)
3239
3239
3240
3240
Return ``True `` if the binary data ends with the specified *suffix *,
3241
3241
otherwise return ``False ``. *suffix * can also be a tuple of suffixes to
@@ -3245,8 +3245,8 @@ arbitrary binary data.
3245
3245
The suffix(es) to search for may be any :term: `bytes-like object `.
3246
3246
3247
3247
3248
- .. method :: bytes.find(sub, start=0, stop =None, /)
3249
- bytearray.find(sub, start=0, stop =None, /)
3248
+ .. method :: bytes.find(sub, start=0, end =None, /)
3249
+ bytearray.find(sub, start=0, end =None, /)
3250
3250
3251
3251
Return the lowest index in the data where the subsequence *sub * is found,
3252
3252
such that *sub * is contained in the slice ``s[start:end] ``. Optional
@@ -3269,8 +3269,8 @@ arbitrary binary data.
3269
3269
Also accept an integer in the range 0 to 255 as the subsequence.
3270
3270
3271
3271
3272
- .. method :: bytes.index(sub, start=0, stop =None, /)
3273
- bytearray.index(sub, start=0, stop =None, /)
3272
+ .. method :: bytes.index(sub, start=0, end =None, /)
3273
+ bytearray.index(sub, start=0, end =None, /)
3274
3274
3275
3275
Like :meth: `~bytes.find `, but raise :exc: `ValueError ` when the
3276
3276
subsequence is not found.
@@ -3333,8 +3333,8 @@ arbitrary binary data.
3333
3333
always produces a new object, even if no changes were made.
3334
3334
3335
3335
3336
- .. method :: bytes.rfind(sub, start=0, stop =None, /)
3337
- bytearray.rfind(sub, start=0, stop =None, /)
3336
+ .. method :: bytes.rfind(sub, start=0, end =None, /)
3337
+ bytearray.rfind(sub, start=0, end =None, /)
3338
3338
3339
3339
Return the highest index in the sequence where the subsequence *sub * is
3340
3340
found, such that *sub * is contained within ``s[start:end] ``. Optional
@@ -3348,8 +3348,8 @@ arbitrary binary data.
3348
3348
Also accept an integer in the range 0 to 255 as the subsequence.
3349
3349
3350
3350
3351
- .. method :: bytes.rindex(sub, start=0, stop =None, /)
3352
- bytearray.rindex(sub, start=0, stop =None, /)
3351
+ .. method :: bytes.rindex(sub, start=0, end =None, /)
3352
+ bytearray.rindex(sub, start=0, end =None, /)
3353
3353
3354
3354
Like :meth: `~bytes.rfind ` but raises :exc: `ValueError ` when the
3355
3355
subsequence *sub * is not found.
@@ -3374,8 +3374,8 @@ arbitrary binary data.
3374
3374
The separator to search for may be any :term: `bytes-like object `.
3375
3375
3376
3376
3377
- .. method :: bytes.startswith(prefix, start=0, stop =None, /)
3378
- bytearray.startswith(prefix, start=0, stop =None, /)
3377
+ .. method :: bytes.startswith(prefix, start=0, end =None, /)
3378
+ bytearray.startswith(prefix, start=0, end =None, /)
3379
3379
3380
3380
Return ``True `` if the binary data starts with the specified *prefix *,
3381
3381
otherwise return ``False ``. *prefix * can also be a tuple of prefixes to
@@ -4501,10 +4501,10 @@ copying.
4501
4501
4502
4502
.. versionadded :: 3.14
4503
4503
4504
- .. method :: index(value, start=0, stop =None, /)
4504
+ .. method :: index(value, start=0, end =None, /)
4505
4505
4506
4506
Return the index of the first occurrence of *value * (at or after
4507
- index *start * and before index *stop *).
4507
+ index *start * and before index *end *).
4508
4508
4509
4509
Raises a :exc: `ValueError ` if *value * cannot be found.
4510
4510
0 commit comments