mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +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
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue