def test01(self): a = pmt_swig.pmt_intern("a") b = pmt_swig.pmt_from_double(123765) d1 = pmt_swig.pmt_make_dict() d2 = pmt_swig.pmt_dict_add(d1, a, b) pmt_swig.pmt_print(d2)
def pmt_from_dict(p): d = pmt.pmt_make_dict() for k, v in p.iteritems(): #dict is immutable -> therefore pmt_dict_add returns the new dict d = pmt.pmt_dict_add(d, python_to_pmt(k), python_to_pmt(v)) return d
def test01 (self): a = pmt_swig.pmt_intern("a") b = pmt_swig.pmt_from_double(123765) d1 = pmt_swig.pmt_make_dict() d2 = pmt_swig.pmt_dict_add(d1, a, b) pmt_swig.pmt_print(d2)
def pmt_from_dict(p): d = pmt.pmt_make_dict() for k, v in p.iteritems(): # dict is immutable -> therefore pmt_dict_add returns the new dict d = pmt.pmt_dict_add(d, python_to_pmt(k), python_to_pmt(v)) return d