Closed nicks closed 1 month ago
Repro steps:
if err := starlark.UnpackArgs("unpack", args, kwargs, "x", &x, "y?", &y, "z", &z); err != nil { t.Errorf("UnpackArgs failed: %v", err) }
f(1, 2)
This is OK.
f(x=1, y=2)
Expected result:
This should succeed. y is optional, so z should also be optional
y
z
Actual result:
UnpackArgs failed: unpack: missing argument for z
Additional info
I have a test in a branch that demonstrates the problem, might also open a PR if the fix is easy.
Did you mean starlark.UnpackArgs("unpack", args, kwargs, ...?
starlark.UnpackArgs("unpack", args, kwargs, ...
oops, yes, fixed!
Repro steps:
This is OK.
Expected result:
This should succeed.
y
is optional, soz
should also be optionalActual result:
Additional info
I have a test in a branch that demonstrates the problem, might also open a PR if the fix is easy.