diff --git a/binarycpython/utils/functions.py b/binarycpython/utils/functions.py index 0dfdc51ad984d46165dbae54352ec5328be5a298..72cf8c7a9ffae6f8ed2a17a35713fa8235a20537 100644 --- a/binarycpython/utils/functions.py +++ b/binarycpython/utils/functions.py @@ -1136,7 +1136,11 @@ def merge_dicts(dict_1: dict, dict_2: dict) -> dict: # dealt with by calling this function again. else: # ints - if isinstance(dict_1[key], int) and isinstance(dict_2[key], int): + # Booleans (has to be the type Bool, not just a 0 or 1) + if isinstance(dict_1[key], bool) and isinstance(dict_2[key], bool): + new_dict[key] = dict_1[key] or dict_2[key] + + elif isinstance(dict_1[key], int) and isinstance(dict_2[key], int): new_dict[key] = dict_1[key] + dict_2[key] # floats @@ -1151,10 +1155,6 @@ def merge_dicts(dict_1: dict, dict_2: dict) -> dict: elif isinstance(dict_1[key], dict) and isinstance(dict_2[key], dict): new_dict[key] = merge_dicts(dict_1[key], dict_2[key]) - # Booleans (has to be the type Bool, not just a 0 or 1) - elif isinstance(dict_1[key], bool) and isinstance(dict_2[key], bool): - new_dict[key] = dict_1[key] or dict_2[key] - else: print( "Object types {},{} not supported".format(