Skip to content

Commit

Permalink
document call argument evaluation order
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentlb committed Sep 24, 2020
1 parent 265fa81 commit 6c37e00
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,13 @@ Once the parameters have been successfully bound to the arguments
supplied by the call, the sequence of statements that comprise the
function body is executed.

Function arguments are evaluated in the order they appear in the call.
<!-- see https://github.com/bazelbuild/starlark/issues/13 -->

Unlike Python, Starlark does not allow more than one `*args` argument in a
call, and if a `*args` argument is present it must appear after all
positional and named arguments.

A function call completes normally after the execution of either a
`return` statement, or of the last statement in the function body.
The result of the function call is the value of the return statement's
Expand Down

0 comments on commit 6c37e00

Please sign in to comment.