[Python-ideas] Unpacking a dict

Nikolaus Rath Nikolaus at rath.org
Tue May 31 15:57:04 EDT 2016


On May 31 2016, Paul Moore <p.f.moore-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> Technically, the "export key" approach could probably me made readable
> in a way I'd be OK with, for example:
>
> export key from query_result (
>     product_id,
>     quantity,
>     distributor,
>     description
> )
>
> but I'm not at all sure that needing 2 new keywords ("export" and
> "key") and a reuse of an existing one ("from") is going to fly - it's
> too wordy, feels like SQL or COBOL to me. Maybe if someone comes up
> with a one-word option for "export key from" then it would be
> viable...

How about

  unravel query_result (this, that, something)

Best,
-Nikolaus

-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«


More information about the Python-ideas mailing list