def merge(self, other): if self is not other: assert self.custom_eq_hash == other.custom_eq_hash, ( "mixing plain dictionaries with r_dict()") ListItem.merge(self, other) if self.custom_eq_hash: self.update_rdict_annotations(other.s_rdict_eqfn, other.s_rdict_hashfn, other=other)
def generalize(self, s_other_value): updated = ListItem.generalize(self, s_other_value) if updated and self.custom_eq_hash: self.emulate_rdict_calls() return updated
def __init__(self, bookkeeper, s_value, is_r_dict=False): ListItem.__init__(self, bookkeeper, s_value) self.custom_eq_hash = is_r_dict