[issue19369] PyObject_LengthHint is slow
Serhiy Storchaka
report at bugs.python.org
Wed Oct 23 22:23:45 CEST 2013
Serhiy Storchaka added the comment:
What if use _PyObject_HasLen?
if (_PyObject_HasLen(o)) {
res = PyObject_Length(o);
...
}
hint = _PyObject_LookupSpecial(o, &PyId___length_hint__);
...
----------
nosy: +serhiy.storchaka
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19369>
_______________________________________
More information about the Python-bugs-list
mailing list