<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 25.05.2016 15:11, Michael Selik
wrote:<br>
</div>
<blockquote
cite="mid:CAGgTfkMu=FzEzoNh2VGog35Y-x-5_MFZQHdYbmJVO9xcHRB1sQ@mail.gmail.com"
type="cite">
<div dir="ltr">I hope to keep discussion in this thread focused on
the most basic form of dict unpacking, but we could e<span
style="line-height:1.5">xtended mapping unpacking similarly to
how PEP 3132 extended iterable unpacking. Just
brainstorming...</span></div>
</blockquote>
<br>
Another idea (borrowed from Erlang):<br>
<br>
<span style="line-height:1.5">>>> mapping = {"a": 1, "b":
2, "c": 3}<br>
</span>>>> {"a": x, "b": y, "c": 3} = mapping<br>
>>> x,y<br>
(1,2)<br>
<br>
<br>
<span style="line-height:1.5">>>> mapping = {"a": 1, "b":
2, "c": 3}<br>
</span>>>> {"a": x, "b": y, "c": 2} = mapping<br>
<span style="line-height:1.5">Traceback:</span>
<div><span style="line-height:1.5">ValueError: key 'c' does not
match to 2<br>
<br>
<br>
Best,<br>
Sven<br>
</span></div>
<br>
</body>
</html>