Oct-03-2017, 05:21 AM
You can always roll your own. Just because it isn't in
dict
doesn't mean you can't use things that waddle and quack like dicts...class Wrapper(dict): def __add__(self, other): final = {} for obj in [self, other]: final.update(obj) return final a = Wrapper({1: 2, 3: 4}) b = Wrapper({1: 3, 5: 6}) print(a+b) # {1: 3, 3: 4, 5: 6}