I would like to do something like this
def f(): return { \'a\' : 1, \'b\' : 2, \'c\' : 3 } { a, b } = f() # or { \'a\', \'b\' } = f() ?
Hmm. Kind of odd since a dictionary is not ordered, so the value unpacking depends on the variable names. But, it's possible, if ugly:
>>> locals().update(f()) >>> a 1
Don't try this at home! It's a maintainability nightmare. But kinda cool too :-)