[Python-ideas] Accepting multiple mappings as positional arguments to create dicts

Steven D'Aprano steve at pearwood.info
Wed Apr 11 00:44:41 EDT 2018


On Wed, Apr 11, 2018 at 02:22:08PM +1000, Chris Angelico wrote:

> >     dict(d1, d2, d3)
> 
> That's more readable than {**d1, **d2, **d3} ? Doesn't look materially
> different to me.

It does to me.

On the one hand, we have a function call (okay, technically a type...) 
"dict()" that can be googled on, with three arguments; on the other 
hand, we have syntax that looks like a set {...} and contains the 
obscure ** prefix operator which is hard to google for.


-- 
Steve


More information about the Python-ideas mailing list