Passing all arguments of a function to another function?

Explicit is better than implicit but if you really don't want to type a few characters.

Explicit is better than implicit but if you really don't want to type a few characters: def func1(a=1, b=2, c=3): func2(**locals()) locals() are all local variables, so you can't set any extra vars before calling func2 or they will get passed too.

1 This will have the flaw that if you've created local variables before calling func2, then they will also be passed to func2. – Ned Batchelder Jun 29 '10 at 0:12 1 maybe you could copy locals right at the beginning of the function? – Bwmat Jun 29 '10 at 0:45 ya, copying is fine I guess.

– roopesh Jun 29 '10 at 0:56 Now I remember reading about locals. I was thinking too much about vars() and couldn't remember locals(). Should have read the documents.

I guess vars() can be used too. – roopesh Jun 29 '10 at 1:02.

Provided that the arguments to func1 are only keyword arguments, you could do this: def func1(a=1, b=2, c=3): func2(**locals()).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions