Improve docstring
This commit is contained in:
parent
51a5ad43b5
commit
a68bdc720a
|
@ -59,7 +59,8 @@ bisect_right(PyObject *self, PyObject *args, PyObject *kw)
|
||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(bisect_right_doc,
|
PyDoc_STRVAR(bisect_right_doc,
|
||||||
"bisect_right(a, x[, lo[, hi]]) -> index\n\
|
"bisect(a, x[, lo[, hi]]) -> index\n\
|
||||||
|
bisect_right(a, x[, lo[, hi]]) -> index\n\
|
||||||
\n\
|
\n\
|
||||||
Return the index where to insert item x in list a, assuming a is sorted.\n\
|
Return the index where to insert item x in list a, assuming a is sorted.\n\
|
||||||
\n\
|
\n\
|
||||||
|
@ -100,7 +101,8 @@ insort_right(PyObject *self, PyObject *args, PyObject *kw)
|
||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(insort_right_doc,
|
PyDoc_STRVAR(insort_right_doc,
|
||||||
"insort_right(a, x[, lo[, hi]])\n\
|
"insort(a, x[, lo[, hi]])\n\
|
||||||
|
insort_right(a, x[, lo[, hi]])\n\
|
||||||
\n\
|
\n\
|
||||||
Insert item x in list a, and keep it sorted assuming a is sorted.\n\
|
Insert item x in list a, and keep it sorted assuming a is sorted.\n\
|
||||||
\n\
|
\n\
|
||||||
|
@ -213,18 +215,15 @@ If x is already in a, insert it to the left of the leftmost x.\n\
|
||||||
Optional args lo (default 0) and hi (default len(a)) bound the\n\
|
Optional args lo (default 0) and hi (default len(a)) bound the\n\
|
||||||
slice of a to be searched.\n");
|
slice of a to be searched.\n");
|
||||||
|
|
||||||
PyDoc_STRVAR(bisect_doc, "Alias for bisect_right().\n");
|
|
||||||
PyDoc_STRVAR(insort_doc, "Alias for insort_right().\n");
|
|
||||||
|
|
||||||
static PyMethodDef bisect_methods[] = {
|
static PyMethodDef bisect_methods[] = {
|
||||||
{"bisect_right", (PyCFunction)bisect_right,
|
{"bisect_right", (PyCFunction)bisect_right,
|
||||||
METH_VARARGS|METH_KEYWORDS, bisect_right_doc},
|
METH_VARARGS|METH_KEYWORDS, bisect_right_doc},
|
||||||
{"bisect", (PyCFunction)bisect_right,
|
{"bisect", (PyCFunction)bisect_right,
|
||||||
METH_VARARGS|METH_KEYWORDS, bisect_doc},
|
METH_VARARGS|METH_KEYWORDS, bisect_right_doc},
|
||||||
{"insort_right", (PyCFunction)insort_right,
|
{"insort_right", (PyCFunction)insort_right,
|
||||||
METH_VARARGS|METH_KEYWORDS, insort_right_doc},
|
METH_VARARGS|METH_KEYWORDS, insort_right_doc},
|
||||||
{"insort", (PyCFunction)insort_right,
|
{"insort", (PyCFunction)insort_right,
|
||||||
METH_VARARGS|METH_KEYWORDS, insort_doc},
|
METH_VARARGS|METH_KEYWORDS, insort_right_doc},
|
||||||
{"bisect_left", (PyCFunction)bisect_left,
|
{"bisect_left", (PyCFunction)bisect_left,
|
||||||
METH_VARARGS|METH_KEYWORDS, bisect_left_doc},
|
METH_VARARGS|METH_KEYWORDS, bisect_left_doc},
|
||||||
{"insort_left", (PyCFunction)insort_left,
|
{"insort_left", (PyCFunction)insort_left,
|
||||||
|
|
Loading…
Reference in New Issue