コード例 #1
0
 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)
コード例 #2
0
ファイル: dictdef.py プロジェクト: abhinavthomas/pypy
 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)
コード例 #3
0
 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
コード例 #4
0
 def __init__(self, bookkeeper, s_value, is_r_dict=False):
     ListItem.__init__(self, bookkeeper, s_value)
     self.custom_eq_hash = is_r_dict
コード例 #5
0
ファイル: dictdef.py プロジェクト: abhinavthomas/pypy
 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
コード例 #6
0
ファイル: dictdef.py プロジェクト: abhinavthomas/pypy
 def __init__(self, bookkeeper, s_value, is_r_dict=False):
     ListItem.__init__(self, bookkeeper, s_value)
     self.custom_eq_hash = is_r_dict