On Wed, Sep 28, 2016 at 12:54 AM, Jussi Piitulainen > <jussi.piitulai...@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) -- https://mail.python.org/mailman/listinfo/python-list
- How to make a copy of chained dicts effectively and ... Nagy László Zsolt
- Re: How to make a copy of chained dicts effecti... Lawrence D’Oliveiro
- Re: How to make a copy of chained dicts eff... Jussi Piitulainen
- Re: How to make a copy of chained dicts... Lawrence D’Oliveiro
- Re: How to make a copy of chained dicts effecti... Jussi Piitulainen
- Re: How to make a copy of chained dicts eff... MRAB
- Re: How to make a copy of chained dicts... Jussi Piitulainen
- Re: How to make a copy of chained d... Chris Angelico
- Re: How to make a copy of chai... Nagy László Zsolt
- Re: How to make a copy of chained dicts effecti... Steve D'Aprano
- Re: How to make a copy of chained dicts effecti... Peter Otten