def pmt_from_dict(p):
    d = pmt.make_dict()
    for k, v in p.iteritems():
        #dict is immutable -> therefore pmt_dict_add returns the new dict
        d = pmt.dict_add(d, python_to_pmt(k), python_to_pmt(v))
    return d
Exemple #2
0
def pmt_from_dict(p):
    d = pmt.make_dict()
    for k, v in p.iteritems():
        #dict is immutable -> therefore pmt_dict_add returns the new dict
        d = pmt.dict_add(d, python_to_pmt(k), python_to_pmt(v))
    return d
Exemple #3
0
 def test01(self):
     a = pmt.intern("a")
     b = pmt.from_double(123765)
     d1 = pmt.make_dict()
     d2 = pmt.dict_add(d1, a, b)
     print d2
Exemple #4
0
 def test01(self):
     a = pmt.intern("a")
     b = pmt.from_double(123765)
     d1 = pmt.make_dict()
     d2 = pmt.dict_add(d1, a, b)
     print d2