top | item 9534091

(no title)

mrocklin | 10 years 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

discuss

order

No comments yet.