diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2009-02-01 12:13:56 +0000 |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2009-02-01 12:13:56 +0000 |
commit | f02e0aaafd2476948047f0ce904af947f02d18ea (patch) | |
tree | 724366997190a0acf829f65a4f1e96d82c060889 /Python | |
parent | 211c6258294bf683935bff73a61ce3dd84070988 (diff) | |
download | cpython-git-f02e0aaafd2476948047f0ce904af947f02d18ea.tar.gz |
Issue #1717: remove the cmp builtin function, the C-API functions
PyObject_Cmp, PyObject_Compare, and various support functions.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 5597bc728e..8cb66c5966 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -493,25 +493,6 @@ PyDoc_STR( ; -static PyObject * -builtin_cmp(PyObject *self, PyObject *args) -{ - PyObject *a, *b; - int c; - - if (!PyArg_UnpackTuple(args, "cmp", 2, 2, &a, &b)) - return NULL; - if (PyObject_Cmp(a, b, &c) < 0) - return NULL; - return PyLong_FromLong((long)c); -} - -PyDoc_STRVAR(cmp_doc, -"cmp(x, y) -> integer\n\ -\n\ -Return negative if x<y, zero if x==y, positive if x>y."); - - static char * source_as_string(PyObject *cmd, char *funcname, char *what) { @@ -2230,7 +2211,6 @@ static PyMethodDef builtin_methods[] = { {"ascii", builtin_ascii, METH_O, ascii_doc}, {"bin", builtin_bin, METH_O, bin_doc}, {"chr", builtin_chr, METH_VARARGS, chr_doc}, - {"cmp", builtin_cmp, METH_VARARGS, cmp_doc}, {"compile", (PyCFunction)builtin_compile, METH_VARARGS | METH_KEYWORDS, compile_doc}, {"delattr", builtin_delattr, METH_VARARGS, delattr_doc}, {"dir", builtin_dir, METH_VARARGS, dir_doc}, |