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

Sven Marnach sven at marnach.net
Fri Apr 20 15:37:10 CEST 2012


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



More information about the Python-ideas mailing list