[Python-ideas] Unpacking a dict

Steven D'Aprano steve at pearwood.info
Thu May 26 13:51:00 EDT 2016

On Thu, May 26, 2016 at 04:10:10PM +0200, Michel Desmoulin wrote:

> The thing with those details is that you can completly ignore them, and
> don't know they exist, and simply look it up when you need it.

What Google search terms would a Python programmer use to find out what

{"1": a, "foo.bar": b, **c} = **mapping


Please don't dismiss the effect of unfamiliar syntax on the reader. 
Adding more magic syntax increases the cost and difficulty of reading 
the code and learning the language. That cost might be justified if the 
new syntax is useful enough, but so far this syntax appears to be of 
very marginal usefulness. There's no obvious use-case where it would be 
an overwhelming benefit, at least not yet.

I believe this syntax comes from Clojure. Can you give some examples of 
real-world code using this syntax in Clojure? (Not toy demonstrations of 
how it works, but working code that uses it to solve real problems.)

If Clojure programmers don't use it, then I expect neither will Python 


More information about the Python-ideas mailing list