> On Mar 30, 2021, at 12:11, Stestagg <stest...@gmail.com> wrote:
> 
> For completeness, from 3.5 onwards, you can also do the following:
> 
> [{'name': n, **d} for n, d in dod.items()]
> 

Reading through these, personally I like this one best. I'm curious what about 
it was enabled in 3.5? Was **kwarg expansion inside a dict literal not possible 
before then? Anyway, I like that it uses simple elemental parts that have been 
around a long long time in Python.

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to