Skip to content

Commit

Permalink
fewer words, easier reading
Browse files Browse the repository at this point in the history
incorporating feedback

incorporating feedback
  • Loading branch information
gnarled-cipher committed Sep 4, 2019
1 parent 02f10b2 commit 7ec597a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions site/docs/skylark/language.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ illegal, and 2) `*args` and `**kwargs` arguments are not allowed.
* `for` statements are not allowed at the top-level. Use them within functions
instead. In BUILD files, you may use list comprehensions.

* `if` statements are not allowed at the top-level. However, `if` expressions
can be used: `first = data[0] if len(data) > 0 else None`.
* `if` statements are not allowed at the top-level. However, `if` expressions can be used: `first = data[0] if len(data) > 0 else None`.

* Deterministic order for iterating through Dictionaries.

Expand All @@ -125,8 +124,7 @@ not defined across value types. In short: `5 < 'foo'` will throw an error and
* In tuples, a trailing comma is valid only when the tuple is between
parentheses, e.g. write `(1,)` instead of `1,`.

* Dictionary literals cannot have duplicated keys. For example, this is an
error: `{"a": 4, "b": 7, "a": 1}`.
* Dictionary literals cannot have duplicated keys. For example, this is an error: `{"a": 4, "b": 7, "a": 1}`.

* The variable used in a comprehension may not be used after the comprehension.
This is stricter than Python 2 and Python 3, which have different behavior
Expand Down

0 comments on commit 7ec597a

Please sign in to comment.