Hacker News new | ask | show | jobs
by mrocklin 4048 days ago
You can manage this by composing merge and merge_with

In [1]: data = [{'a': {'b': 1}}, {'a': {'c': 2}}]

In [2]: from toolz import merge, merge_with

In [3]: merge_with(merge, data) Out[3]: {'a': {'b': 1, 'c': 2}}

You'd have to be a bit clever to go fully recursive