[Python-ideas] Have dict().update() return its own reference.

Laurens Van Houtven _ at lvh.cc
Fri Apr 20 16:41:24 CEST 2012


That's not actually true. **kwargs can contain things that aren't strings :)

cheers
lvh



On 20 Apr 2012, at 15:37, Sven Marnach wrote:

> Masklinn schrieb am Fri, 20. Apr 2012, um 14:47:34 +0200:
>> If you start from dict instances, you could always use:
>> 
>>    merged = dict(x, **y)
> 
> No, not always.  Only if all keys of `y` are strings (and probably
> they should also be valid Python identifiers.)
> 
> Cheers,
>    Sven
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas




More information about the Python-ideas mailing list