-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
The math.trunc function has:
Lines 2073 to 2076 in f013b47
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
sunmy2019
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error