forwarding *arg parameter

Tuomas tuomas.vesterinen at
Tue Nov 7 15:54:55 CET 2006

Steven D'Aprano wrote:
> On Mon, 06 Nov 2006 13:03:55 +0000, Tuomas wrote:
>>If you read the whole chain you find out what we were talking of.
> I had already read the whole thread, and I've read it again in case I
> missed something the first time, and I still have no idea why you think
> you need to do this. You explain *what* you want to do, but not *why* you
> want to do it.

Redirecting a funtion parameter to an other function is a quite common 
situation in programming. Here the question was forwarding *args 
parameter. Have you ever tried this and found the difference in cases:

def f(*args):
     x = g(args)  # how g sees arguments in this case
     x = g(*args) # and how it sees them in this case

I am happy with what Dennis Lee Bieber wrote in the second latest node 
in this chain. So luckily my "flattern" is not needed because the 
problem I had can be solved in the calling function.


More information about the Python-list mailing list