diff options
author | Jeffrey Yasskin <jyasskin@gmail.com> | 2008-02-01 06:22:46 (GMT) |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@gmail.com> | 2008-02-01 06:22:46 (GMT) |
commit | ca2b69f765dd8a7f5c8e5c5346572519a8768ec4 (patch) | |
tree | e1a5f81f05f96d7f85313182316fdb070cfdf1bc /Python | |
parent | 951cc0f474e4757e6954f0435952804211c5637c (diff) | |
download | cpython-ca2b69f765dd8a7f5c8e5c5346572519a8768ec4.zip cpython-ca2b69f765dd8a7f5c8e5c5346572519a8768ec4.tar.gz cpython-ca2b69f765dd8a7f5c8e5c5346572519a8768ec4.tar.bz2 |
Move __builtins__.trunc() to math.trunc() per
http://mail.python.org/pipermail/python-dev/2008-January/076626.html and issue
1965.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index cd74758..fe691fc 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -2044,20 +2044,6 @@ PyDoc_STRVAR(vars_doc, Without arguments, equivalent to locals().\n\ With an argument, equivalent to object.__dict__."); -static PyObject * -builtin_trunc(PyObject *self, PyObject *number) -{ - /* XXX: The py3k branch gets better errors for this by using - _PyType_Lookup(), but since float's mro isn't set in py2.6, - we just use PyObject_CallMethod here. */ - return PyObject_CallMethod(number, "__trunc__", NULL); -} - -PyDoc_STRVAR(trunc_doc, -"trunc(Real) -> Integral\n\ -\n\ -returns the integral closest to x between 0 and x."); - static PyObject* builtin_sum(PyObject *self, PyObject *args) @@ -2406,7 +2392,6 @@ static PyMethodDef builtin_methods[] = { {"unichr", builtin_unichr, METH_VARARGS, unichr_doc}, #endif {"vars", builtin_vars, METH_VARARGS, vars_doc}, - {"trunc", builtin_trunc, METH_O, trunc_doc}, {"zip", builtin_zip, METH_VARARGS, zip_doc}, {NULL, NULL}, }; |