Leif K-Brooks <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > execfunc = { 'key1' : (func1, ()), > > 'key2' : (func2, args) } > > > > now, something like: > > > > f, a = execfunc[k] > > f(**a) > > > > will work for either key. > > Shouldn't func1's args be a dictionary, not a tuple?
Yes, to call with ** a must be a dict (so {}, not ()). Alex -- http://mail.python.org/mailman/listinfo/python-list