ignore classic classes
This commit is contained in:
parent
af1692a266
commit
3f3d36bd03
|
@ -107,6 +107,8 @@ _PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue)
|
|||
PyErr_Clear();
|
||||
}
|
||||
|
||||
if (PyInstance_Check(o))
|
||||
return defaultvalue;
|
||||
/* try o.__length_hint__() */
|
||||
hintmeth = _PyObject_LookupSpecial(o, "__length_hint__", &hintstrobj);
|
||||
if (hintmeth == NULL)
|
||||
|
|
Loading…
Reference in New Issue