예제 #1
0
 def f(i):
     d = {i + .0: 5, i + .5: 6}
     total = 0
     for k, v, h in iteritems_with_hash(d):
         total += k * h * v
     total -= (i + 0.0) * compute_hash(i + 0.0) * 5
     total -= (i + 0.5) * compute_hash(i + 0.5) * 6
     return total
예제 #2
0
 def f(i):
     d = {i + .0: 5, i + .5: 6}
     total = 0
     for k, v, h in iteritems_with_hash(d):
         total += k * h * v
     total -= (i + 0.0) * compute_hash(i + 0.0) * 5
     total -= (i + 0.5) * compute_hash(i + 0.5) * 6
     return total
예제 #3
0
파일: celldict.py 프로젝트: zcxowwww/pypy
 def getiteritems_with_hash(self, w_dict):
     return objectmodel.iteritems_with_hash(self.unerase(w_dict.dstorage))
예제 #4
0
파일: celldict.py 프로젝트: cimarieta/usp
 def getiteritems_with_hash(self, w_dict):
     return objectmodel.iteritems_with_hash(self.unerase(w_dict.dstorage))
예제 #5
0
파일: classdict.py 프로젝트: Mu-L/pypy
 def getiteritems_with_hash(self, w_dict):
     return iteritems_with_hash(self.unerase(w_dict.dstorage).dict_w)
예제 #6
0
파일: classdict.py 프로젝트: mozillazg/pypy
 def getiteritems_with_hash(self, w_dict):
     return iteritems_with_hash(self.unerase(w_dict.dstorage).dict_w)