Calling a function, arguments in a dict ??

Thomas Weholt 2002 at
Mon Jun 23 00:19:24 CEST 2003

If I got a dictionary with a bunch of key/values I want to use as named
arguments for a function, how do I do that?

Say we got a function a, takes three parameters; x,y,z. In my dictionary I
got {'z': 1, 'x': 2, 'y': 3}. How can I create some code that will call it
like this :

a(z =1, x=2, y=3)


Best regards,

More information about the Python-list mailing list