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

Sérgio Surkamp sergio at gruposinternet.com.br
Fri Sep 10 19:43:30 CEST 2010


Em Fri, 10 Sep 2010 18:37:44 +0200
cool-RR <cool-rr at cool-rr.com> escreveu:

> 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?
> 
> 
> Ram.

How the compiler should treat that? Put half of the arguments in the
first list and the other half on the second list?

Regards,
-- 
  .:''''':.
.:'        `     Sérgio Surkamp | Gerente de Rede
::    ........   sergio at gruposinternet.com.br
`:.        .:'
  `:,   ,.:'     *Grupos Internet S.A.*
    `: :'        R. Lauro Linhares, 2123 Torre B - Sala 201
     : :         Trindade - Florianópolis - SC
     :.'
     ::          +55 48 3234-4109
     :
     '           http://www.gruposinternet.com.br



More information about the Python-ideas mailing list