-
-
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
"view objects" for keys(dict) and values(dict) #2347
Comments
I'm conservatively applying the "breaking" tag, so please remove it if there's no way anyone could be relying on details of the current behavior. |
No, this seems breaking, therefore 0.2. As long as the view is read-only it seems reasonable, but in that case, you can't do things like sort! the view. |
We could add this easily (yet another use of an immutable type, too), and get arrays of keys with |
I implemented this and will push it soon. Then |
Will (or can you make) In working on |
Thanks Jeff for working on this. I think |
Yes |
Currently
keys(dict)
andvalues(dict)
are Arrays in Julia.In Python 2 this was also the case, but in Python 3 this was changed to returning "view objects", see: http://docs.python.org/3.0/library/stdtypes.html#dict.keys
I think they got the idea from the Java collections framework.
Personally I like this a lot, what are your opinions about this for Julia?
The text was updated successfully, but these errors were encountered: