-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Iteration order of Dict #56841
Copy link
Copy link
Closed
Labels
collectionsData structures holding multiple items, e.g. setsData structures holding multiple items, e.g. setsdocsThis change adds or pertains to documentationThis change adds or pertains to documentationiterationInvolves iteration or the iteration protocolInvolves iteration or the iteration protocol
Metadata
Metadata
Assignees
Labels
collectionsData structures holding multiple items, e.g. setsData structures holding multiple items, e.g. setsdocsThis change adds or pertains to documentationThis change adds or pertains to documentationiterationInvolves iteration or the iteration protocolInvolves iteration or the iteration protocol
If
dict::Dict, are all of the following:guaranteed to iterate entries of
dictin the same order ?Currently the documentation states that
keys(dict)andvalues(dict)iterate in the same order. But it is not stated whether this is the same order as that used bypairs(dict), or when looping,for (k,v) in dict.If this is guaranteed, can it be mentioned explicitly in the documentation?