Issue #28257: Improved error message when pass a non-iterable as

a var-positional argument.  Added opcode BUILD_TUPLE_UNPACK_WITH_CALL.
This commit is contained in:
Serhiy Storchaka 2016-10-02 10:33:46 +03:00
parent 8f0f205649
commit 7344285c19
9 changed files with 140 additions and 113 deletions

View file

@ -233,6 +233,16 @@ What about willful misconduct?
...
TypeError: h() argument after * must be an iterable, not function
>>> h(1, *h)
Traceback (most recent call last):
...
TypeError: h() argument after * must be an iterable, not function
>>> h(*[1], *h)
Traceback (most recent call last):
...
TypeError: h() argument after * must be an iterable, not function
>>> dir(*h)
Traceback (most recent call last):
...