bazelbuild / starlark

Starlark Language
Apache License 2.0
2.44k stars 163 forks source link

Add keyword-only arguments to the spec #248

Closed laurentlb closed 1 year ago

laurentlb commented 1 year ago

The wording is copied from https://github.com/google/starlark-go/pull/143 and https://github.com/google/starlark-go/pull/151

Fixes #23

tetromino commented 1 year ago

There is more wording we have to fix in the spec in this case. For example, this part:

if a *args argument is present it must appear after all positional and named arguments.

laurentlb commented 1 year ago

This line is already in the spec.

https://github.com/bazelbuild/starlark/blob/e2175b4ec1312c196347cef439b36980b06b195f/spec.md?plain=1#L1233

tetromino commented 1 year ago

This line is already in the spec.

https://github.com/bazelbuild/starlark/blob/e2175b4ec1312c196347cef439b36980b06b195f/spec.md?plain=1#L1233

Sorry for being unclear: I meant that the line is now likely to confuse the reader. I pushed a commit to explicitly point out the difference between the use of keyword-only arguments in a function call vs. function declaration.

laurentlb commented 1 year ago

Thanks! Your updates look good to me