[Python-ideas] Why not f(*my_list, *my_other_list) ?

Terry Reedy tjreedy at udel.edu
Fri Sep 10 23:25:35 CEST 2010


On 9/10/2010 12:37 PM, cool-RR wrote:
> I noticed that it's impossible to call a Python function with two
> starred argument lists, like this: `f(*my_list, *my_other_list)`. I
> mean, if someone wants to feed two lists of arguments into a function,
> why not?
>
> I understand why you can't have two stars in a function definition; But
> why can't you have two (or more) stars in a function call?

Beyond
0. Not needed
as others explained, some speculations:

1. Calls are designed to mirror definition. No multiple stars in 
definition means no multiple stars in calls.

2. Multiple stars begin to look like typing errors.

3. No one ever thought to support such.

4. It would make the call process even more complex, and it is slow 
enough already.

5. It might conflict with the current implementation.

-- 
Terry Jan Reedy




More information about the Python-ideas mailing list