Starlark
≈ 1 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
Starlark is a lightweight, high-level programming language designed for embedded use in applications. It uses a subset of the Python syntax. By default, the code is deterministic and hermetic.
Impact
Starlark is a lightweight, high-level programming language designed for embedded use in applications. It uses a subset of the Python syntax. By default, the code is deterministic and hermetic.
The = statement to assign a value to a variable The augmented assignment statements to modify a variable The if statement to execute conditionally a block of code (with else or elif ) The for statement to iterate over an iterable object The def statement to define a function The break statement to exit a loop The continue statement to skip the rest of the current iteration and continues with the next The pass statement, serving as a NOP, syntactically needed to create an empty code block The return statement to return a value from a function.
The load statement, which replaces Python import , to import a value from another module. Unlike Python, the order of load statements does not affect the semantics of the code. Unlike Python, Starlark statements don't include: while , try , raise , class , with , del , assert , yield , import , match and case .
Text derived from https://en.wikipedia.org/w/index.php?oldid=1377401470 under CC BY-SA 4.0; modifications have been made.