diff options
author | Jason Zhang <yurenzhang2017@gmail.com> | 2024-02-03 15:11:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-03 15:11:10 (GMT) |
commit | efc489021c2a5dba46979bd304563aee0c479a31 (patch) | |
tree | d38a63136ad63c397de6c4431616ea6b7b7550fb /Python | |
parent | 28bb2961ba2f650452c949fcfc75ccfe0b5517e9 (diff) | |
download | cpython-efc489021c2a5dba46979bd304563aee0c479a31.zip cpython-efc489021c2a5dba46979bd304563aee0c479a31.tar.gz cpython-efc489021c2a5dba46979bd304563aee0c479a31.tar.bz2 |
gh-111417: Remove unused code block in math.trunc() and round() (GH-111454)
_PyObject_LookupSpecial() now ensures that the type is ready.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index e54d5cb..31c1bf0 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -2382,11 +2382,6 @@ builtin_round_impl(PyObject *module, PyObject *number, PyObject *ndigits) { PyObject *round, *result; - if (!_PyType_IsReady(Py_TYPE(number))) { - if (PyType_Ready(Py_TYPE(number)) < 0) - return NULL; - } - round = _PyObject_LookupSpecial(number, &_Py_ID(__round__)); if (round == NULL) { if (!PyErr_Occurred()) |