Comma: separators and trailing commas

Syntax and values

Behavior and details

Commas separate call arguments, function parameters, List items, and Map entries. Trailing commas are accepted in these lists and command-call arguments. Commas are not a decimal separator in source, even in Dutch syntax. A comma cannot join independent statements or create a tuple.

Example

# language: en
function add(a, b,):
    return a + b
say(add(2, 3,), 1.5,)

Syntax and values · Built-ins · Programming guides