Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updates str.index documentation, makes it Argument Clinic compatible.
  • Loading branch information
lisroach committed Feb 20, 2017
commit 5860a7fcb1e58b67e35539eae5b2c5e04cc72b7d
18 changes: 17 additions & 1 deletion Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -11687,7 +11687,23 @@ 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 B where subsection sub is found, \n\
such that sub is contained within B[start,end]. Optional\n\
arguments start and end are interpreted as in slice notation.\n\
\n\
Raises ValueError when the subsection is not found.");

/*[clinic input]
str.index as unicode_index

Return the lowest index in B where subsection sub is found.

Return the lowest index in B where subsection sub is found,
such that sub is contained within B[start,end]. Optional
arguments start and end are interpreted as in slice notation.

Raises ValueError when the subsection is not found.
[clinic start generated code]*/

static PyObject *
unicode_index(PyObject *self, PyObject *args)
Expand Down