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)
| 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): |
no test coverage detected