How to make a copy of chained dicts effectively and nicely?
Nagy László Zsolt
gandalf at shopzeus.com
Fri Sep 30 02:51:42 EDT 2016
On Wed, Sep 28, 2016 at 12:54 AM, Jussi Piitulainen
> <jussi.piitulainen at helsinki.fi> wrote:
>> I wasn't sure if it makes a copy or just returns the dict. But it's
>> true: help(dict) says dict(mapping) is a "new dictionary initialized
>> from a mapping object's (key, value) pairs".
> Yep. With mutable objects, Python's docs are usually pretty clear that
> you get a brand-new object every time:
In that case, this seems to be the cleanest and most effective. (Sorry
for the late answer)
More information about the Python-list
mailing list