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.


On 13 Oct. 2016, at 6:41 am, אלעזר 
<<>> 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)

Python-ideas mailing list
Code of Conduct:

Reply via email to