-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation guarantee that keys(Dict)
and values(Dict)
iterate the elements of a Dict
in the same order
#18090
Comments
keys(Dict)
and values(Dict)
iterate a the elements of a Dict
in the same orderkeys(Dict)
and values(Dict)
iterate the elements of a Dict
in the same order
If we document it, we should also test it, which I think isn't done at present. |
can i solve this issue. i am new to contributing, i dont know the process of assigning the issue. |
We don't generally assign issues to somebody. Just mentioning here that you're working on it is fine. |
i am newbie to contributing, so just to confirm my tasks to solve this issue.
|
Rather to the docstrings for
You can add a doctest if it makes sense to present this in the docstring. If it's too long, add it to a test in |
i have created the pull request for this issue |
Looking at dict.jl I see that
keys(Dict)
andvalues(Dict)
simply iterate theDict
, returning the key or the value, respectively. Therefore they return the elements in the same order (see http://stackoverflow.com/questions/39002073/values-and-keys-guaranteed-to-be-in-the-same-order). It would be nice if this were guaranteed in the documentation (that is, that it doesn't change in the future).The text was updated successfully, but these errors were encountered: