◐ Shell
clean mode source ↗

Message 277594 - Python tracker

Proposed patch fixes error message for var-positional arguments. It adds new opcode BUILD_TUPLE_UNPACK_WITH_CALL.

>>> min(1, *2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: min() argument after * must be an iterable, not int
>>> min(*[1], *2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: min() argument after * must be an iterable, not int