Daniel Urban <urban.dani...@gmail.com> added the comment: I'm attaching an updated patch. Instead !PyIter_Check() this patch checks for tp_iter == NULL && !PySequence_Check. If this condition is false, PyObject_GetIter has a chance to succeed (and if it fails, we shouldn't mask the exception). I also added more tests which show why the previous patch was incorrect.
---------- Added file: http://bugs.python.org/file21028/issue4806.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4806> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com