From: Raymond Hettinger Date: Fri, 27 Apr 2012 07:20:39 +0000 (-0700) Subject: Improve docstring X-Git-Tag: v2.7.4rc1~877 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a68bdc720a7bc71b6cd672bfb79e2b0e627814bc;p=python Improve docstring --- diff --git a/Modules/_bisectmodule.c b/Modules/_bisectmodule.c index ffcd994cfa..25e50715ac 100644 --- a/Modules/_bisectmodule.c +++ b/Modules/_bisectmodule.c @@ -59,7 +59,8 @@ bisect_right(PyObject *self, PyObject *args, PyObject *kw) } 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\ Return the index where to insert item x in list a, assuming a is sorted.\n\ \n\ @@ -100,7 +101,8 @@ insort_right(PyObject *self, PyObject *args, PyObject *kw) } 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\ Insert item x in list a, and keep it sorted assuming a is sorted.\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\ 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[] = { {"bisect_right", (PyCFunction)bisect_right, METH_VARARGS|METH_KEYWORDS, bisect_right_doc}, {"bisect", (PyCFunction)bisect_right, - METH_VARARGS|METH_KEYWORDS, bisect_doc}, + METH_VARARGS|METH_KEYWORDS, bisect_right_doc}, {"insort_right", (PyCFunction)insort_right, METH_VARARGS|METH_KEYWORDS, insort_right_doc}, {"insort", (PyCFunction)insort_right, - METH_VARARGS|METH_KEYWORDS, insort_doc}, + METH_VARARGS|METH_KEYWORDS, insort_right_doc}, {"bisect_left", (PyCFunction)bisect_left, METH_VARARGS|METH_KEYWORDS, bisect_left_doc}, {"insort_left", (PyCFunction)insort_left,