Aug. 12, 2015
10:41 a.m.
On Wed, Aug 12, 2015, at 09:57, Scott Sanderson wrote:
def do_stuff_from_json(json_dict): # Assigns variables in the **values** of the lefthand side by doing lookups # of the corresponding keys in the result of the righthand side expression. {'foo': foo, 'bar': bar} = json.loads(json_dict)
How about: key = 'foo' key2 = 'bar' {key: value, key2: value2, **rest} = json.loads(json_dict)