From d605a62eb9908fe44c89a2ed10f88f633c4dcb3e Mon Sep 17 00:00:00 2001 From: vladmos Date: Thu, 22 Feb 2018 07:52:30 -0800 Subject: Define the dict iteration order PiperOrigin-RevId: 186616752 --- src/main/java/com/google/devtools/build/lib/syntax/SkylarkDict.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/google/devtools') diff --git a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkDict.java b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkDict.java index fc9da3a177..3cd3f999bb 100644 --- a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkDict.java +++ b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkDict.java @@ -51,7 +51,9 @@ import javax.annotation.Nullable; + "in operator tests for membership in the keyset of the dict.
" + "
\"a\" in {\"a\" : 2, \"b\" : 5} "
           + "# evaluates as True
" - + "The iteration order for a dict is deterministic but not specified." + + "The iteration order for a dict is deterministic and specified as the order in which " + + "the keys have been added to the dict. The iteration order is not affected if a value " + + "associated with an existing key is updated." ) public final class SkylarkDict extends MutableMap implements Map, SkylarkIndexable { -- cgit v1.2.3