diff(old, new) comparing two flat dicts and returning a dict with three keys: added (keys only in new), removed (keys only in old), and changed (keys in both whose values differ, mapped to (old_value, new_value) tuples).diff({'a': 1, 'b': 2}, {'b': 3, 'c': 4}){'added': ['c'], 'removed': ['a'], 'changed': {'b': (2, 3)}}One of each kind of difference.
Set algebra on the key views.
Intersection keys need a value comparison.