Member predicate CallableValue::getNamedArgumentForCall
Gets the argument in call
corresponding to the name
d 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
this
represents thePythonFunctionValue
fordef func(a, b):
, andcall
representsfunc(10, 20)
, thengetNamedArgumentForCall(call, "a")
will give theControlFlowNode
for10
. -
with
call
representingfunc(b=20, a=10)
,getNamedArgumentForCall(call, "a")
will give theControlFlowNode
for10
. -
if
this
represents thePythonFunctionValue
fordef func(self, a, b):
, andcall
representsfoo.func(10, 20)
, thengetNamedArgumentForCall(call, "a")
will give theControlFlowNode
for10
.
ControlFlowNode getNamedArgumentForCall(CallNode call, string name)