Issue #24731: Fixed crash on converting objects with special methods
__str__, __trunc__, and __float__ returning instances of subclasses of
str, long, and float to subclasses of str, long, and float correspondingly.
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 1143fab..82f9960 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -1839,7 +1839,7 @@
tmp = float_new(&PyFloat_Type, args, kwds);
if (tmp == NULL)
return NULL;
- assert(PyFloat_CheckExact(tmp));
+ assert(PyFloat_Check(tmp));
newobj = type->tp_alloc(type, 0);
if (newobj == NULL) {
Py_DECREF(tmp);