Esempio n. 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)))
Esempio n. 2
0
File: common.py Progetto: 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)))
Esempio n. 3
0
def to_abstract_test(self, d: dict):
    return AbstractDict({k: self(v) for k, v in d.items()})