示例#1
0
def D(__d=None, **dct):
    if __d is None:
        d = {}
    else:
        d = __d
    d.update(**dct)
    keys = list(d.keys())
    values = list(to_abstract_test(v) for v in d.values())
    return AbstractDict(dict(zip(keys, values)))
示例#2
0
文件: common.py 项目: tor4z/myia
def D(__d=None, **dct):
    """Generate a symbolic dict from parsing given dict."""
    if __d is None:
        d = {}
    else:
        d = __d
    d.update(**dct)
    keys = list(d.keys())
    values = list(to_abstract_test(v) for v in d.values())
    return AbstractDict(dict(zip(keys, values)))
示例#3
0
def to_abstract_test(self, d: dict):
    return AbstractDict({k: self(v) for k, v in d.items()})