Make math.{floor,ceil}({int,long}) return float again for backwards

compatibility after r59671 made them return integral types.
This commit is contained in:
Jeffrey Yasskin 2008-01-04 08:01:23 +00:00
parent e0734e7dc0
commit 737c73f96f
3 changed files with 12 additions and 4 deletions

View file

@ -3402,9 +3402,9 @@ static PyMethodDef long_methods[] = {
"Returns self, the complex conjugate of any long."},
{"__trunc__", (PyCFunction)long_long, METH_NOARGS,
"Truncating an Integral returns itself."},
{"__floor__", (PyCFunction)long_long, METH_NOARGS,
{"__floor__", (PyCFunction)long_float, METH_NOARGS,
"Flooring an Integral returns itself."},
{"__ceil__", (PyCFunction)long_long, METH_NOARGS,
{"__ceil__", (PyCFunction)long_float, METH_NOARGS,
"Ceiling of an Integral returns itself."},
{"__round__", (PyCFunction)long_round, METH_VARARGS,
"Rounding an Integral returns itself.\n"