[Python-ideas] Have dict().update() return its own reference.
Alexander Belopolsky
alexander.belopolsky at gmail.com
Fri Apr 20 16:35:55 CEST 2012
More information about the Python-ideas mailing list
Fri Apr 20 16:35:55 CEST 2012
- Previous message: [Python-ideas] Have dict().update() return its own reference.
- Next message: [Python-ideas] Have dict().update() return its own reference.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Apr 20, 2012 at 9:37 AM, Sven Marnach <sven at marnach.net> wrote: >> 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.) >>> a = {} >>> b = {1:2} >>> dict(a, **b) {1: 2}
- Previous message: [Python-ideas] Have dict().update() return its own reference.
- Next message: [Python-ideas] Have dict().update() return its own reference.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-ideas mailing list