diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-21 17:06:07 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-21 17:06:07 (GMT) |
commit | 4886cc331ff158f8ede74878a436adfad205bd2d (patch) | |
tree | e9473cb0fd8449b2bdfcea9826e5c795e6ba87e2 /Python | |
parent | 79212998a8d46712edcf7c4f3fbaefca05a7b08b (diff) | |
download | cpython-4886cc331ff158f8ede74878a436adfad205bd2d.zip cpython-4886cc331ff158f8ede74878a436adfad205bd2d.tar.gz cpython-4886cc331ff158f8ede74878a436adfad205bd2d.tar.bz2 |
Get rid of most of the rest of coerce (slot is still there for now).
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 8f1f464..8b92c87 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -333,30 +333,6 @@ PyDoc_STRVAR(cmp_doc, \n\ Return negative if x<y, zero if x==y, positive if x>y."); - -static PyObject * -builtin_coerce(PyObject *self, PyObject *args) -{ - PyObject *v, *w; - PyObject *res; - - if (!PyArg_UnpackTuple(args, "coerce", 2, 2, &v, &w)) - return NULL; - if (PyNumber_Coerce(&v, &w) < 0) - return NULL; - res = PyTuple_Pack(2, v, w); - Py_DECREF(v); - Py_DECREF(w); - return res; -} - -PyDoc_STRVAR(coerce_doc, -"coerce(x, y) -> (x1, y1)\n\ -\n\ -Return a tuple consisting of the two numeric arguments converted to\n\ -a common type, using the same rules as used by arithmetic operations.\n\ -If coercion is not possible, raise TypeError."); - static PyObject * builtin_compile(PyObject *self, PyObject *args) { @@ -2068,7 +2044,6 @@ static PyMethodDef builtin_methods[] = { {"callable", builtin_callable, METH_O, callable_doc}, {"chr", builtin_chr, METH_VARARGS, chr_doc}, {"cmp", builtin_cmp, METH_VARARGS, cmp_doc}, - {"coerce", builtin_coerce, METH_VARARGS, coerce_doc}, {"compile", builtin_compile, METH_VARARGS, compile_doc}, {"delattr", builtin_delattr, METH_VARARGS, delattr_doc}, {"dir", builtin_dir, METH_VARARGS, dir_doc}, |