How do I compare two complex data structures?
- by Phil H
I have some nested datastructures, each something like:
[ ('foo', [ {'a':1, 'b':2},
{'a':3.3, 'b':7} ]),
('bar', [ {'a':4, 'd':'efg', 'e':False} ]) ]
I need to compare these structures, to see if there are any differences. Short of writing a function to explicitly walk the structure, is there an existing library or method of doing this kind of recursive comparison?