gh-111417: Remove unused code block in math.trunc() and round() (GH-111454)

_PyObject_LookupSpecial() now ensures that the type is ready.
This commit is contained in:
Jason Zhang 2024-02-03 15:11:10 +00:00 committed by GitHub
parent 28bb2961ba
commit efc489021c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 0 additions and 10 deletions

View file

@ -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())