Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
deleted 2 characters in body
Source Link
user2555451
user2555451

As the error message states, Python does not allow you to have an unnamed argumentarguments after *arg.

Therefore, you need to explicitly name third:

>>> def producer(): ... return ('a','b') ... >>> def consumer(first, second, third): ... print first+second+third ... >>> arg = producer() >>> consumer(*arg, third='c') abc >>> 

As the error message states, Python does not allow you to have an unnamed argument after *arg.

Therefore, you need to explicitly name third:

>>> def producer(): ... return ('a','b') ... >>> def consumer(first, second, third): ... print first+second+third ... >>> arg = producer() >>> consumer(*arg, third='c') abc >>> 

As the error message states, Python does not allow you to have unnamed arguments after *arg.

Therefore, you need to explicitly name third:

>>> def producer(): ... return ('a','b') ... >>> def consumer(first, second, third): ... print first+second+third ... >>> arg = producer() >>> consumer(*arg, third='c') abc >>> 
Source Link
user2555451
user2555451

As the error message states, Python does not allow you to have an unnamed argument after *arg.

Therefore, you need to explicitly name third:

>>> def producer(): ... return ('a','b') ... >>> def consumer(first, second, third): ... print first+second+third ... >>> arg = producer() >>> consumer(*arg, third='c') abc >>>