New submission from Guilherme Polo <ggp...@gmail.com>: Hi,
I find it weird that given this sample code: def g(): yield iter(None) list(*g()) I get this traceback: Traceback (most recent call last): File "a1.py", line 3, in <module> list(*g()) TypeError: type object argument after * must be a sequence, not generator At a minimum the exception message looks awkward to me. With the proposed patch, the new traceback would be: Traceback (most recent call last): File "a1.py", line 3, in <module> list(*g()) File "a1.py", line 2, in g yield iter(None) TypeError: 'NoneType' object is not iterable ---------- files: check_tpiter_before_overriding_msg.diff keywords: patch messages: 81657 nosy: gpolo severity: normal status: open title: Check for tp_iter in ceval:ext_do_call before overriding exception message Added file: http://bugs.python.org/file13035/check_tpiter_before_overriding_msg.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5218> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com