The semantics seem fairly obvious if you treat it as changing the method calls. 
For lists, * uses .extend() instead of .append(). Sets use * for .update() 
instead of .add(). Dicts use ** for .update() instead of __setitem__. In that 
case x should be a mapping (or iterable of pairs maybe), and all pairs in that 
should be added to the dict. In generator expressions * means yield from 
instead of just yield. The ** in dicts is needed to distinguish between set and 
dict comprehensions, since it doesn't use a colon.

Spencer

On 13 Oct. 2016, at 6:41 am, אלעזר 
<elaz...@gmail.com<mailto:elaz...@gmail.com>> wrote:

To be honest, I don't have a clear picture of what {**x for x in d.items()} 
should be. But I do have such picture for

    dict(**x for x in many_dictionaries)

Elazar
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to