OrderedCollections.jl icon indicating copy to clipboard operation
OrderedCollections.jl copied to clipboard

Feature request: range selection

Open bramtayl opened this issue 5 years ago • 1 comments

I'm not exactly sure of the best syntax here, but if there's not already a way to do it, it might be nice to be able to use indexing to select all keys within a range:

dictionary[2:3] could create an ordered dict (or view?) with just the keys between 2 and 3

dictionary[2:end] could create an ordered dict (or view?) with all keys 2 or more

dictionary[start:2] could create an ordered dict (or view?) with all keys 2 or less.

bramtayl avatar Sep 28 '20 15:09 bramtayl

I could be convinced to do a PR

bramtayl avatar Sep 28 '20 15:09 bramtayl