[Tutor] Dictionaries supplying arguments to functions

Tom Nott nott@it.uts.edu.au
Tue, 7 Aug 2001 12:21:13 +1000


Is it possible to have a dictionary supply the arguments to a function?

I'm after something like:

def fn(p1, p2, p3):
    print p1
    print p2
    print p3

d = {'p1':'How ', 'p2':'are ', 'p3':'you'}

callWithDict(fn, d)

-- 
Tom Nott