Kaydet (Commit) 3f3d36bd authored tarafından Benjamin Peterson's avatar Benjamin Peterson

ignore classic classes

üst af1692a2
...@@ -107,6 +107,8 @@ _PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue) ...@@ -107,6 +107,8 @@ _PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue)
PyErr_Clear(); PyErr_Clear();
} }
if (PyInstance_Check(o))
return defaultvalue;
/* try o.__length_hint__() */ /* try o.__length_hint__() */
hintmeth = _PyObject_LookupSpecial(o, "__length_hint__", &hintstrobj); hintmeth = _PyObject_LookupSpecial(o, "__length_hint__", &hintstrobj);
if (hintmeth == NULL) if (hintmeth == NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment