<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, May 26, 2016 at 11:39 PM Steven D'Aprano <<a href="mailto:steve@pearwood.info">steve@pearwood.info</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Thu, May 26, 2016 at 11:28:25PM +0100, Nathan Schneider wrote:<br>
<br>
> Instead of special syntax, what if dict.values() returned a tuple when<br>
> given keys as arguments:<br>
><br>
>    partner_id, product_id, ship_to, product_ids = my_dict.values(<br>
>            'partner_id', 'product_id', 'ship_to', 'product_ids')<br><br>
<br>
I like this idea. I think it beats the status quo:<br></blockquote><div><br></div><div>Isn't this the status quo?</div><div>    a, b, c = [mapping[k] for k in ('a', 'b', 'c')]</div><div><br></div><div>That was already someone's argument that a special dict unpacking syntax is unnecessary.</div></div></div>