MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / keywords_to_dict

Function keywords_to_dict

tensorflow/python/autograph/pyct/ast_util.py:119–126  ·  view source on GitHub ↗

Converts a list of ast.keyword objects to a dict.

(keywords)

Source from the content-addressed store, hash-verified

117
118
119def keywords_to_dict(keywords):
120 """Converts a list of ast.keyword objects to a dict."""
121 keys = []
122 values = []
123 for kw in keywords:
124 keys.append(gast.Constant(kw.arg, kind=None))
125 values.append(kw.value)
126 return gast.Dict(keys=keys, values=values)
127
128
129class PatternMatcher(gast.NodeVisitor):

Callers

nothing calls this directly

Calls 2

appendMethod · 0.45
ConstantMethod · 0.45

Tested by

no test coverage detected