summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorJason Zhang <yurenzhang2017@gmail.com>2024-02-03 15:11:10 (GMT)
committerGitHub <noreply@github.com>2024-02-03 15:11:10 (GMT)
commitefc489021c2a5dba46979bd304563aee0c479a31 (patch)
treed38a63136ad63c397de6c4431616ea6b7b7550fb /Python
parent28bb2961ba2f650452c949fcfc75ccfe0b5517e9 (diff)
downloadcpython-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.c5
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())