MCPcopy
hub / github.com/django/django / merge_dicts

Method merge_dicts

django/db/models/query_utils.py:368–377  ·  view source on GitHub ↗

Merge dicts in reverse to preference the order of the original list. e.g., merge_dicts([a, b]) will preference the keys in 'a' over those in 'b'.

(dicts)

Source from the content-addressed store, hash-verified

366
367 @staticmethod
368 def merge_dicts(dicts):
369 """
370 Merge dicts in reverse to preference the order of the original list.
371 e.g., merge_dicts([a, b]) will preference the keys in 'a' over those in
372 'b'.
373 """
374 merged = {}
375 for d in reversed(dicts):
376 merged.update(d)
377 return merged
378
379 @classmethod
380 def _clear_cached_class_lookups(cls):

Callers 2

get_class_lookupsMethod · 0.80
get_class_lookupsMethod · 0.80

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected