[Python-ideas] Unpacking a dict
Paul Moore
p.f.moore at gmail.com
Tue May 31 16:06:08 EDT 2016
On 31 May 2016 at 20:57, Nikolaus Rath <Nikolaus at rath.org> wrote:
> 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)
Meh. Don't assume that if you come up with a good word, I'll be in
favour. At best, I'll go from -1 to -0 or maybe +0. Should we get to
something that looks reasonably attractive to me, there's still issues
with the whole thing being a niche problem, limited applicability (by
leaping at "unravel" you lost the ability to extract attributes from
an object - did you mean to do that?), etc.
Basically, don't waste too much time trying to convince me. A better
bet would be to get sufficient support from others that my opinion is
irrelevant (which it may well be anyway :-))
Paul
More information about the Python-ideas
mailing list