R. David Murray added the comment:
Thanks for the report. Retitling because this has nothing to do with map:
>>> def foo(*args):
... raise TypeError('fake')
... yield 1
...
>>> foo(1, *foo())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: foo() argument after * must be an iterable, not generator
>>> foo(*foo())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 2, in foo
TypeError: fake
----------
nosy: +r.david.murray
stage: -> needs patch
title: Bad error message about maps not iterable -> *args unpacking can mask
TypeErrors
versions: +Python 3.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue31071>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com