@@ -542,7 +542,11 @@ _Py_bytes_find(const char *str, Py_ssize_t len, PyObject *args)
542542PyDoc_STRVAR_shared (_Py_index__doc__ ,
543543"B.index(sub[, start[, end]]) -> int\n\
544544\n\
545- Like B.find() but raise ValueError when the subsection is not found." );
545+ Return the lowest index in B where subsection sub is found,\n\
546+ such that sub is contained within B[start,end]. Optional\n\
547+ arguments start and end are interpreted as in slice notation.\n\
548+ \n\
549+ Raises ValueError when the subsection is not found." );
546550
547551PyObject *
548552_Py_bytes_index (const char * str , Py_ssize_t len , PyObject * args )
@@ -579,7 +583,11 @@ _Py_bytes_rfind(const char *str, Py_ssize_t len, PyObject *args)
579583PyDoc_STRVAR_shared (_Py_rindex__doc__ ,
580584"B.rindex(sub[, start[, end]]) -> int\n\
581585\n\
582- Like B.rfind() but raise ValueError when the subsection is not found." );
586+ Return the highest index in B where subsection sub is found,\n\
587+ such that sub is contained within B[start,end]. Optional\n\
588+ arguments start and end are interpreted as in slice notation.\n\
589+ \n\
590+ Raise ValueError when the subsection is not found." );
583591
584592PyObject *
585593_Py_bytes_rindex (const char * str , Py_ssize_t len , PyObject * args )
@@ -811,4 +819,3 @@ PyDoc_STRVAR_shared(_Py_zfill__doc__,
811819"\n"
812820"Pad a numeric string B with zeros on the left, to fill a field\n"
813821"of the specified width. B is never truncated." );
814-
0 commit comments