[Django]-Django: `MergeDict` is deprecated, use `dict.update()` instead

3👍

You can use collections.ChainMap. It does the same thing as MergeDict: keeps a list of mappings and accesses them in order.

However it’s generally simpler to just actually perform the merge of the dictionaries. It probably isn’t impossible to add copying support to your custom class and just update it.

Leave a comment