Serhiy Storchaka added the comment: Here is a patch which uses _PyObject_HasLen. It has same performance but is much simpler.
---------- Added file: http://bugs.python.org/file32323/lengthhint_2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19369> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com