diff -r 00bfe5bd3553 Lib/bisect.py --- a/Lib/bisect.py Thu Nov 24 11:57:05 2016 -0800 +++ b/Lib/bisect.py Thu Nov 24 22:04:30 2016 +0100 @@ -19,8 +19,6 @@ def insort_right(a, x, lo=0, hi=None): else: lo = mid+1 a.insert(lo, x) -insort = insort_right # backward compatibility - def bisect_right(a, x, lo=0, hi=None): """Return the index where to insert item x in list a, assuming a is sorted. @@ -42,8 +40,6 @@ def bisect_right(a, x, lo=0, hi=None): else: lo = mid+1 return lo -bisect = bisect_right # backward compatibility - def insort_left(a, x, lo=0, hi=None): """Insert item x in list a, and keep it sorted assuming a is sorted. @@ -90,3 +86,7 @@ try: from _bisect import * except ImportError: pass + +# Aliases for backward compatibility +bisect = bisect_right +insort = insort_right diff -r 00bfe5bd3553 Modules/_bisectmodule.c --- a/Modules/_bisectmodule.c Thu Nov 24 11:57:05 2016 -0800 +++ b/Modules/_bisectmodule.c Thu Nov 24 22:04:30 2016 +0100 @@ -216,18 +216,11 @@ If x is already in a, insert it to the l 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}, {"insort_right", (PyCFunction)insort_right, METH_VARARGS|METH_KEYWORDS, insort_right_doc}, - {"insort", (PyCFunction)insort_right, - METH_VARARGS|METH_KEYWORDS, insort_doc}, {"bisect_left", (PyCFunction)bisect_left, METH_VARARGS|METH_KEYWORDS, bisect_left_doc}, {"insort_left", (PyCFunction)insort_left,