bazelbuild / bazelbuild/starlark
Permit multiple **kwargs arguments
- Dominant language
- Python
- Stars
- 3.1k
- Forks
- 178
- PR merge metrics
- No merged PRs in 30d
Description
Given the function call `f(**a, **b)` the meaning is clear and precise. But the best Starlark-compliant alternative I could find is:
```
x = dict(a)
a.update(b)
f(**x)
```
That seems more complex, and it's easy to get it wrong, and it doesn't error if a key is repeated (unlike before).
Given an extension to multiple `**kwargs`, I see no reason not to allow it for `*args` too, although there the argument is weaker.
Contributor guide
Research direction
The issue proposes allowing multiple **kwargs arguments in a Starlark call and raises the possibility of allowing multiple *args arguments too. Start by reviewing the language's call-argument handling and existing duplicate-key behavior; define the semantics and test cases before implementation. Done means the proposal is resolved, specified, and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100