<div dir="auto"><div>Sounds like that happens quite often. </div><div dir="auto"><br></div><div dir="auto">Yep, I totally agree with your point, I think I mentioned something like this in the post as a possible partial solution: a drop-in replacement for an ugly list compression people seem to be using now to solve the problem. It's easy to implement, but the adoption by community is questionable. I mean, if this is a relatively rare use case, but those who need it seem to have their own one-liners for that already, is there even a need for a method or function like this in standard library? To unify to improve readability (single standard "getitems" instead of many different get_n, gets, get_mutliple)? The only motivation I can think of, and even it is questionable. </div><div dir="auto"><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On Nov 12, 2017 05:06, "Nick Coghlan" <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text">On 11 November 2017 at 16:22, Jelle Zijlstra <<a href="mailto:jelle.zijlstra@gmail.com">jelle.zijlstra@gmail.com</a>> wrote:<br>
> 2017-11-10 19:53 GMT-08:00 Ben Usman <<a href="mailto:bigobangux@gmail.com">bigobangux@gmail.com</a>>:<br>
</div><div class="quoted-text">>> I was not able to find any PEPs that suggest this (search keywords:<br>
>> "PEP 445 dicts", "dictionary unpacking assignment", checked PEP-0),<br>
>> however, let me know if I am wrong.<br>
>><br>
> It was discussed at great length on Python-ideas about a year ago. There is<br>
> a thread called "Unpacking a dict" from May 2016.<br>
<br>
</div>I tend to post this every time the topic comes up, but: it's highly<br>
unlikely we'll get syntax for this when we don't even have a builtin<br>
to extract multiple items from a mapping in a single operation.<br>
<br>
So if folks would like dict unpacking syntax, then a suitable place to<br>
start would be a proposal for a "getitems"  builtin that allowed<br>
operations like:<br>
<br>
    b, a  = getitems(d, ("b", "a"))<br>
<br>
operator.itemgetter and operator.attrgetter may provide some<br>
inspiration for possible proposals.<br>
<br>
Cheers,<br>
Nick.<br>
<font color="#888888"><br>
--<br>
Nick Coghlan   |   <a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>   |   Brisbane, Australia<br>
</font></blockquote></div><br></div></div></div>