Member predicate CallableValue::getNamedArgumentForCall
Gets the argument in call corresponding to the named keyword parameter of this callable.
This method also gives results when the argument is passed as a positional argument in call, as long
as this is not a builtin function or a builtin method.
Examples:
-
if
thisrepresents thePythonFunctionValuefordef func(a, b):, andcallrepresentsfunc(10, 20), thengetNamedArgumentForCall(call, "a")will give theControlFlowNodefor10. -
with
callrepresentingfunc(b=20, a=10),getNamedArgumentForCall(call, "a")will give theControlFlowNodefor10. -
if
thisrepresents thePythonFunctionValuefordef func(self, a, b):, andcallrepresentsfoo.func(10, 20), thengetNamedArgumentForCall(call, "a")will give theControlFlowNodefor10.
ControlFlowNode getNamedArgumentForCall(CallNode call, string name)