Open
Description
There are multiple ways to iterate a Dict
. The functions keys(dict)
and values(dict)
are guaranteed to return items in a consistent order, as stated in the docs (https://docs.julialang.org/en/latest/base/collections/#Base.keys):
But keys(a) and values(a) both iterate a and return the elements in the same order.
This is of course assuming that the Dict
has not been modified in between. However it is not asserted that for (k,v) in dict ...
also iterates items in the same order as keys(dict)
and values(dict)
. If this is guaranteed, it should be mentioned in the docs.