JuliaLang/julia

make KeyIterator and ValueIterator more array-like

Open

#10 092 ouverte le 5 févr. 2015

Voir sur GitHub
 (9 commentaires) (3 réactions) (0 assignés)Julia (5 773 forks)batch import
collectionshelp wanted

Métriques du dépôt

Stars
 (48 709 stars)
Métriques de merge PR
 (Merge moyen 20j 6h) (157 PRs mergées en 30 j)

Description

When have d = Dict(:foo => 12.34, "bar" => 567) and you write keys(d) you get a Base.KeyIterator object, which is fast and cheap to construct from the dictionary d. You can write collect(keys(d)) to get an array of keys, but you have to do this unfortunately often. It would be a good self-contained project to add more array-like behaviors to KeyIterator and the corresponding ValueIterator types so that things like keys(d)[1] and values(d)[end] work as expected.

Guide contributeur