compare_dicts#
- compare_dicts(dict1: dict, dict2: dict, except_keys=None)#
Compare dictionaries by comparing values of sorted keys. If values are again dictionaries, the comparison is recursive. :param dict1: first dictionary to be compared :param dict2: second dictionary to be compared :param except_keys: a set of keys to exclude from comparison :return: 1 if dict1 > dict2,
-1 if dict1 < dict2, 0 if dict1 == dict2.