Martin Panter added the comment: I am posting a new version of Daniel’s patch as issue4806-star-TypeError.v2.patch:
* Merged with recent “default” (3.5) branch * Dropped the documentation fix, since revision a8aa918041c2 already fixed that in an identical fashion * Changed to a “look before you leap” style check before attempting PySequence_Tuple(). This way we get to keep other valid errors such as “iter() returned non-iterator”. I am comfortable with the code changes previous patch as well as mine. Checking the “tp_iter” field and PySequence_Check() is basically what happens behind the scenes, via PyObject_GetIter() anyway. So I think either patch is valid and a worthwhile improvement. ---------- Added file: http://bugs.python.org/file38219/issue4806-star-TypeError.v2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4806> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com