mirror of
https://github.com/python/cpython.git
synced 2025-09-17 14:16:02 +00:00
Neaten-up a bit.
This commit is contained in:
parent
2d1aa3350a
commit
fe424f754f
1 changed files with 1 additions and 5 deletions
|
@ -157,17 +157,13 @@ FUNC1(tanh, tanh,
|
||||||
static PyObject *
|
static PyObject *
|
||||||
math_trunc(PyObject *self, PyObject *number)
|
math_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);
|
return PyObject_CallMethod(number, "__trunc__", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(math_trunc_doc,
|
PyDoc_STRVAR(math_trunc_doc,
|
||||||
"trunc(x:Real) -> Integral\n"
|
"trunc(x:Real) -> Integral\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Truncates x to the nearest Integral toward 0. Uses the __trunc__ magic"
|
"Truncates x to the nearest Integral toward 0. Uses the __trunc__ magic method.");
|
||||||
"method.");
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
math_frexp(PyObject *self, PyObject *arg)
|
math_frexp(PyObject *self, PyObject *arg)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue