mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Make math.{floor,ceil}({int,long}) return float again for backwards
compatibility after r59671 made them return integral types.
This commit is contained in:
parent
e0734e7dc0
commit
737c73f96f
3 changed files with 12 additions and 4 deletions
|
|
@ -1086,9 +1086,9 @@ static PyMethodDef int_methods[] = {
|
|||
"Returns self, the complex conjugate of any int."},
|
||||
{"__trunc__", (PyCFunction)int_int, METH_NOARGS,
|
||||
"Truncating an Integral returns itself."},
|
||||
{"__floor__", (PyCFunction)int_int, METH_NOARGS,
|
||||
{"__floor__", (PyCFunction)int_float, METH_NOARGS,
|
||||
"Flooring an Integral returns itself."},
|
||||
{"__ceil__", (PyCFunction)int_int, METH_NOARGS,
|
||||
{"__ceil__", (PyCFunction)int_float, METH_NOARGS,
|
||||
"Ceiling of an Integral returns itself."},
|
||||
{"__round__", (PyCFunction)int_round, METH_VARARGS,
|
||||
"Rounding an Integral returns itself.\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue