New submission from Mark Florisson <markflorisso...@gmail.com>: >>> list(*('boo' for x in [1])) ['b', 'o', 'o'] >>> list(*(range('error') for x in [1])) # notice the erroneous error message Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: type object argument after * must be a sequence, not generator >>> list(*[range('error') for x in [1]]) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: range() integer end argument expected, got str. >>> list(*(int('error') for x in [1])) # does work correctly for ValueError Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 1, in <genexpr> ValueError: invalid literal for int() with base 10: 'error'
---------- components: Interpreter Core messages: 96642 nosy: eggy severity: normal status: open title: If a generator raises TypeError when being unpacked, an unrelated error message is shown versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7548> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com