[Python-ideas] Unpack of sequences

Cesare Di Mauro cesare.di.mauro at gmail.com
Wed Aug 29 18:17:30 CEST 2012


2012/8/29 Mike Graham <mikegraham at gmail.com>

> On Wed, Aug 29, 2012 at 11:45 AM, Masklinn <masklinn at masklinn.net> wrote:
> > On 2012-08-29, at 17:03 , Guido van Rossum wrote:
> >>
> >> Also of course assignment has no equivalent to keyword parameters
> >
> > I've always thought it would be a rather neat way to unpack
> > dictionaries, instead of doing it by hand or abusing `itemgetter` to get
> > values in a known order.
>
> Do you have a suggestion of a nice syntax for a thing to unpack
> mappings (or to unpack things by attributes)?
>
> Mike
>

a: x, b: y, c: z = {'a': 'x', 'b': 'y', 'c': 'z'}

Cesare
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120829/909ccc37/attachment.html>


More information about the Python-ideas mailing list