From 929b63d44b953d6b85208efe300f9333468091fe Mon Sep 17 00:00:00 2001 From: CuriousLearner Date: Sat, 18 Feb 2017 12:09:39 +0530 Subject: [PATCH] bpo-29549: Fixes docstring for str.index --- Objects/unicodeobject.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index d3516fa45f9156..d38b90f0c3f609 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -11687,7 +11687,11 @@ unicode_hash(PyObject *self) PyDoc_STRVAR(index__doc__, "S.index(sub[, start[, end]]) -> int\n\ \n\ -Like S.find() but raise ValueError when the substring is not found."); +Return the lowest index in S where substring sub is found, \n\ +such that sub is contained within S[start:end]. Optional \n\ +arguments start and end are interpreted as in slice notation.\n\ +\n\ +Raises ValueError when substring is not found."); static PyObject * unicode_index(PyObject *self, PyObject *args)