I expected this to work: def f(**args): locals().update(args) print locals() print a d=dict(a=1) f(**d) but: > global name 'a' is not defined Where is my mistake? This does work: globals().update({'a':1}) print a 1 -E