Mercurial > cpython-lru_cache-weakref
diff Python/bltinmodule.c @ 51246:0162cd4f55be 3.0
Merged revisions 69184 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r69184 | mark.dickinson | 2009-02-01 12:13:56 +0000 (Sun, 01 Feb 2009) | 3 lines
Issue #1717: remove the cmp builtin function, the C-API functions
PyObject_Cmp, PyObject_Compare, and various support functions.
........
| author | Mark Dickinson <dickinsm@gmail.com> |
|---|---|
| date | Sun, 01 Feb 2009 12:31:56 +0000 |
| parents | 9c1f06b273f7 |
| children | 87fbbf22adf3 |
line wrap: on
line diff
--- a/Python/bltinmodule.c Sun Feb 01 10:41:18 2009 +0000 +++ b/Python/bltinmodule.c Sun Feb 01 12:31:56 2009 +0000 @@ -494,25 +494,6 @@ ; -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) { @@ -2233,7 +2214,6 @@ {"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},
