Bug report
Bug description:
The math.trunc function has:
|
if (!_PyType_IsReady(Py_TYPE(x))) { |
|
if (PyType_Ready(Py_TYPE(x)) < 0) |
|
return NULL; |
|
} |
c.f.
math.ceil or
math.floor.
This seems to be a history artifact: the function was introduced in 400adb0 as a moved builtins.trunc(), while math.ceil/floor were here from the initial revision.
I think it's safe to remove mentioned block.
PS: Issue opened per @serhiy-storchaka suggestion in #110000.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs